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>
This commit is contained in:
Vijay Bellur 2011-08-22 14:55:09 +05:30
parent 4f9396545b
commit d9ead57226
2 changed files with 3 additions and 2 deletions

View File

@ -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);

View File

@ -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) )