summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-sm.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-sm.c
parent32c8f70f49c0e287c53998e37867f00fa775377b (diff)
downloadglusterfs-b2b6ab8eff317f6a507ab23897ea6cd5c718d99a.tar.gz
glusterfs-b2b6ab8eff317f6a507ab23897ea6cd5c718d99a.tar.xz
glusterfs-b2b6ab8eff317f6a507ab23897ea6cd5c718d99a.zip
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-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-sm.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.c b/xlators/mgmt/glusterd/src/glusterd-sm.c
index cbd1bb0aae..c048e38297 100644
--- a/xlators/mgmt/glusterd/src/glusterd-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-sm.c
@@ -562,7 +562,6 @@ glusterd_ac_send_friend_update (glusterd_friend_sm_event_t *event, void *ctx)
count++;
- memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "friend%d", count);
ret = gd_add_friend_to_dict (peerinfo, friends, key);
if (ret)
@@ -666,7 +665,6 @@ glusterd_ac_update_friend (glusterd_friend_sm_event_t *event, void *ctx)
count++;
- memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "friend%d", count);
ret = gd_add_friend_to_dict (peerinfo, friends, key);
if (ret)