diff options
author | Vijay Bellur <vijay@gluster.com> | 2011-08-22 14:55:09 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-08-22 02:50:26 -0700 |
commit | d9ead57226faf82f3f1375a29e06d348625ba905 (patch) | |
tree | 6339dc3b93e207c1a74c621438ca73d55c4d9bed | |
parent | 4f9396545ba9c91d4bebfc81148c0082237141f4 (diff) |
mgmt/glusterd: Initialize local variable in volgen
Change-Id: I84b4f7c9c2787334ce67e5c3e0534953b691c8e0
BUG: 3460
Reviewed-on: http://review.gluster.com/295
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
-rw-r--r-- | libglusterfs/src/xlator.c | 1 | ||||
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index e826228ed..42c701a2d 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -156,7 +156,6 @@ xlator_volopt_dynload (char *xlator_type, void **dl_handle, } *dl_handle = handle; - INIT_LIST_HEAD (&opt_list->list); vol_opt = GF_CALLOC (1, sizeof (volume_opt_list_t), gf_common_mt_volume_opt_list_t); diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 73650e345..d16289a21 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -1748,7 +1748,7 @@ glusterd_get_volopt_content (gf_boolean_t xml_out) char *xlator_type = NULL; void *dl_handle = NULL; - volume_opt_list_t vol_opt_handle; + volume_opt_list_t vol_opt_handle = {{0},}; char *key = NULL; struct volopt_map_entry *vme = NULL; int ret = -1; @@ -1777,6 +1777,8 @@ glusterd_get_volopt_content (gf_boolean_t xml_out) goto out; } + INIT_LIST_HEAD (&vol_opt_handle.list); + for (vme = &glusterd_volopt_map[0]; vme->key; vme++) { if ( ( vme->type == NO_DOC) || (vme->type == GLOBAL_NO_DOC) ) |