summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-08-16 14:15:27 +0300
committerAmar Tumballi <amarts@redhat.com>2018-08-21 04:50:51 +0000
commit2348b8ae6ce02f83069d01478a31bb2498cc6183 (patch)
tree3a29321a07fdc200c678b3b34d32b307a6464351 /glusterfsd
parentf2fbe364ee166416d484cd75ffa7f181f131a446 (diff)
glusterfsd/src/glusterfsd.c : reduce size or re-scope message variable
The the error and/or message variable was either: - Reduced in size - from 2048 bytes to 64 bytes, for example. or - Changed in scope - defined in a smaller scope. Compile-tested only! Change-Id: I20b9fb3407a74ba96fcbc7f05fcab534ff562c09 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index d4b3a1139ad..5497f592ea6 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -911,7 +911,6 @@ parse_opts (int key, char *arg, struct argp_state *state)
double d = 0.0;
gf_boolean_t b = _gf_false;
char *pwd = NULL;
- char tmp_buf[2048] = {0,};
char *tmp_str = NULL;
char *port_str = NULL;
struct passwd *pw = NULL;
@@ -1000,7 +999,8 @@ parse_opts (int key, char *arg, struct argp_state *state)
errno);
break;
}
- snprintf (tmp_buf, 1024, "%s/%s", pwd, arg);
+ char tmp_buf[1024];
+ snprintf (tmp_buf, sizeof(tmp_buf), "%s/%s", pwd, arg);
cmd_args->volfile = gf_strdup (tmp_buf);
free (pwd);
} else {