summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server.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/protocol/server/src/server.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/protocol/server/src/server.c')
-rw-r--r--xlators/protocol/server/src/server.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index 8ff51a1..73d239f0 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -193,7 +193,6 @@ server_priv_to_dict (xlator_t *this, dict_t *dict, char *brickname)
(!strcmp (brickname,
xprt->xl_private->bound_xl->name))) {
peerinfo = &xprt->peerinfo;
- memset (key, 0, sizeof (key));
snprintf (key, sizeof (key),
"client%d.hostname",
count);
@@ -202,7 +201,6 @@ server_priv_to_dict (xlator_t *this, dict_t *dict, char *brickname)
if (ret)
goto unlock;
- memset (key, 0, sizeof (key));
snprintf (key, sizeof (key),
"client%d.bytesread",
count);
@@ -211,7 +209,6 @@ server_priv_to_dict (xlator_t *this, dict_t *dict, char *brickname)
if (ret)
goto unlock;
- memset (key, 0, sizeof (key));
snprintf (key, sizeof (key),
"client%d.byteswrite",
count);
@@ -220,7 +217,6 @@ server_priv_to_dict (xlator_t *this, dict_t *dict, char *brickname)
if (ret)
goto unlock;
- memset (key, 0, sizeof (key));
snprintf (key, sizeof (key),
"client%d.opversion",
count);
@@ -229,7 +225,6 @@ server_priv_to_dict (xlator_t *this, dict_t *dict, char *brickname)
if (ret)
goto unlock;
- memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "client%d.name",
count);
ret = dict_set_str (dict, key,