summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-tier.c
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-08-02 16:02:33 +0300
committerAmar Tumballi <amarts@redhat.com>2018-08-14 05:15:04 +0000
commitb2b6ab8eff317f6a507ab23897ea6cd5c718d99a (patch)
tree45fb1392f535f0236f057d9d9c932feda4f9ab40 /xlators/mgmt/glusterd/src/glusterd-tier.c
parent32c8f70f49c0e287c53998e37867f00fa775377b (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-tier.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-tier.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-tier.c b/xlators/mgmt/glusterd/src/glusterd-tier.c
index 0823a83449d..608b035fa16 100644
--- a/xlators/mgmt/glusterd/src/glusterd-tier.c
+++ b/xlators/mgmt/glusterd/src/glusterd-tier.c
@@ -1138,7 +1138,6 @@ glusterd_add_tierd_to_dict (glusterd_volinfo_t *volinfo,
* an zero value to parse.
* */
- memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "%s.port", base_key);
ret = dict_set_int32 (dict, key, 0);
if (ret)
@@ -1148,13 +1147,11 @@ glusterd_add_tierd_to_dict (glusterd_volinfo_t *volinfo,
brick_online = gf_is_service_running (pidfile, &pid);
- memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "%s.pid", base_key);
ret = dict_set_int32 (dict, key, pid);
if (ret)
goto out;
- memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "%s.status", base_key);
ret = dict_set_int32 (dict, key, brick_online);