From 2b0ae216ba7b27f490ccf5f6af978707e6f39d05 Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Thu, 16 Aug 2018 14:19:55 +0300 Subject: xlators/mgmt/glusterd/src/glusterd-utils.c : re-scope message variable The the error message variable changed in scope - defined in a smaller scope. Compile-tested only! Change-Id: I16dda11c30099b0e448b8e44a300f153727ce8da updates: bz#1193929 Signed-off-by: Yaniv Kaul --- xlators/mgmt/glusterd/src/glusterd-utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 87c1fcaaad1..a7ff9d70ab9 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -13277,7 +13277,6 @@ glusterd_get_default_val_for_volopt (dict_t *ctx, gf_boolean_t all_opts, struct volopt_map_entry *vme = NULL; int ret = -1; int count = 0; - char err_str[PATH_MAX] = ""; xlator_t *this = NULL; char *def_val = NULL; char dict_key[50] = ""; @@ -13366,6 +13365,7 @@ glusterd_get_default_val_for_volopt (dict_t *ctx, gf_boolean_t all_opts, out: if (ret && !all_opts && !key_found) { + char err_str[PATH_MAX]; snprintf (err_str, sizeof (err_str), "option %s does not exist", orig_key); *op_errstr = gf_strdup (err_str); -- cgit