diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2018-08-02 16:02:33 +0300 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-08-14 05:15:04 +0000 |
commit | b2b6ab8eff317f6a507ab23897ea6cd5c718d99a (patch) | |
tree | 45fb1392f535f0236f057d9d9c932feda4f9ab40 /xlators/mgmt/glusterd/src/glusterd-geo-rep.c | |
parent | 32c8f70f49c0e287c53998e37867f00fa775377b (diff) |
All: remove memset() before sprintf()
It's not needed.
There's a good chance the compiler is smart enough to remove it
anyway, but it can't hurt - I hope.
Compile-tested only!
Change-Id: Id7c054e146ba630227affa591007803f3046416b
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-geo-rep.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c index 8dc20ffc954..b70d32fab77 100644 --- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c +++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c @@ -5248,7 +5248,6 @@ glusterd_op_sys_exec (dict_t *dict, char **op_errstr, dict_t *rsp_dict) } for (i=1; i <= cmd_args_count; i++) { - memset (cmd_arg_name, '\0', sizeof(cmd_arg_name)); snprintf (cmd_arg_name, sizeof(cmd_arg_name), "cmd_arg_%d", i); ret = dict_get_str (dict, cmd_arg_name, &cmd_args[i-1]); @@ -5288,7 +5287,6 @@ glusterd_op_sys_exec (dict_t *dict, char **op_errstr, dict_t *rsp_dict) output_count = 1; else output_count++; - memset (output_name, '\0', sizeof (output_name)); snprintf (output_name, sizeof (output_name), "output_%d", output_count); if (buf[strlen(buf) - 1] == '\n') |