summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-store.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-store.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-store.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 570ff85df5a..814aa754d97 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -315,7 +315,6 @@ gd_store_brick_snap_details_write (int fd, glusterd_brickinfo_t *brickinfo)
}
if (strlen(brickinfo->mount_dir) > 0) {
- memset (value, 0, sizeof (value));
snprintf (value, sizeof(value), "%s", brickinfo->mount_dir);
ret = gf_store_save_value (fd,
GLUSTERD_STORE_KEY_BRICK_MOUNT_DIR, value);
@@ -347,14 +346,12 @@ gd_store_brick_snap_details_write (int fd, glusterd_brickinfo_t *brickinfo)
}
}
- memset (value, 0, sizeof (value));
snprintf (value, sizeof(value), "%d", brickinfo->snap_status);
ret = gf_store_save_value (fd, GLUSTERD_STORE_KEY_BRICK_SNAP_STATUS,
value);
if (ret)
goto out;
- memset (value, 0, sizeof (value));
snprintf (value, sizeof (value), "%lu", brickinfo->statfs_fsid);
ret = gf_store_save_value (fd, GLUSTERD_STORE_KEY_BRICK_FSID, value);
@@ -828,7 +825,6 @@ glusterd_volume_write_snap_details (int fd, glusterd_volinfo_t *volinfo)
goto out;
}
- memset (buf, 0, sizeof (buf));
snprintf (buf, sizeof (buf), "%"PRIu64, volinfo->snap_max_hard_limit);
ret = gf_store_save_value (fd, GLUSTERD_STORE_KEY_SNAP_MAX_HARD_LIMIT,
buf);
@@ -4931,7 +4927,6 @@ glusterd_store_save_quota_version_and_cksum (glusterd_volinfo_t *volinfo)
goto out;
}
- memset (buf, 0, sizeof (buf));
snprintf (buf, sizeof (buf)-1, "%u", volinfo->quota_conf_version);
ret = gf_store_save_value (fd, "version", buf);
if (ret) {