summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volgen.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-volgen.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-volgen.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index fd25608..99a0704 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -1587,7 +1587,6 @@ gfproxy_server_graph_builder (volgen_graph_t *graph,
return -1;
}
- memset (key, 0, sizeof (key));
if (password) {
snprintf (key, sizeof (key), "auth.login.%s.password",
username);
@@ -1596,7 +1595,6 @@ gfproxy_server_graph_builder (volgen_graph_t *graph,
goto out;
}
- memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "gfproxyd-%s", volinfo->volname);
ret = xlator_set_option (xl, "auth-path", key);
@@ -2532,7 +2530,6 @@ brick_graph_add_server (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
}
if (username) {
- memset (key, 0, sizeof (key));
len = snprintf (key, sizeof (key), "auth.login.%s.allow",
brickinfo->path);
if ((len < 0) || (len >= sizeof(key))) {
@@ -2545,7 +2542,6 @@ brick_graph_add_server (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
}
if (password) {
- memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "auth.login.%s.password",
username);
@@ -2554,7 +2550,6 @@ brick_graph_add_server (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
return -1;
}
- memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "auth-path");
ret = xlator_set_option (xl, key, brickinfo->path);
@@ -2566,7 +2561,6 @@ brick_graph_add_server (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
if (volname && !strcmp (volname, GLUSTER_SHARED_STORAGE)) {
- memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "strict-auth-accept");
ret = xlator_set_option (xl, key, "true");
@@ -2575,7 +2569,6 @@ brick_graph_add_server (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
}
if (dict_get_str (volinfo->dict, "auth.ssl-allow", &ssl_user) == 0) {
- memset (key, 0, sizeof (key));
len = snprintf (key, sizeof (key), "auth.login.%s.ssl-allow",
brickinfo->path);
if ((len < 0) || (len >= sizeof(key))) {