summaryrefslogtreecommitdiffstats
path: root/rpc
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 /rpc
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 'rpc')
-rw-r--r--rpc/rpc-transport/rdma/src/name.c1
-rw-r--r--rpc/rpc-transport/socket/src/name.c1
2 files changed, 0 insertions, 2 deletions
diff --git a/rpc/rpc-transport/rdma/src/name.c b/rpc/rpc-transport/rdma/src/name.c
index f132b9638f8..2db1f08c751 100644
--- a/rpc/rpc-transport/rdma/src/name.c
+++ b/rpc/rpc-transport/rdma/src/name.c
@@ -411,7 +411,6 @@ af_inet_server_get_local_sockaddr (rpc_transport_t *this,
listen_host = data_to_str (listen_host_data);
}
- memset (service, 0, sizeof (service));
sprintf (service, "%d", listen_port);
memset (&hints, 0, sizeof (hints));
diff --git a/rpc/rpc-transport/socket/src/name.c b/rpc/rpc-transport/socket/src/name.c
index 077736a2e52..34e6372a8f3 100644
--- a/rpc/rpc-transport/socket/src/name.c
+++ b/rpc/rpc-transport/socket/src/name.c
@@ -409,7 +409,6 @@ af_inet_server_get_local_sockaddr (rpc_transport_t *this,
}
}
- memset (service, 0, sizeof (service));
sprintf (service, "%d", listen_port);
memset (&hints, 0, sizeof (hints));