From f75823f6fcb8aa3116f712ed69fbf4b35d4c3bdd Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Thu, 23 Aug 2018 09:21:02 +0300 Subject: libglusterfs/src/iobuf.c: remove memset(), CALLOC -> MALLOC I'm not sure I see the need for those memset(), I've removed them. There's at least one easy to convert CALLOC to MALLOC - converted. Only compile-tested! updates: bz#1193929 Signed-off-by: Yaniv Kaul Change-Id: Ia019775ad5255190f5d02d948ea27db7f563387d --- libglusterfs/src/iobuf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'libglusterfs') diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c index 0ca272986a1..b2b4da1c111 100644 --- a/libglusterfs/src/iobuf.c +++ b/libglusterfs/src/iobuf.c @@ -844,8 +844,7 @@ iobref_new () { struct iobref *iobref = NULL; - iobref = GF_CALLOC (sizeof (*iobref), 1, - gf_common_mt_iobref); + iobref = GF_MALLOC (sizeof (*iobref), gf_common_mt_iobref); if (!iobref) return NULL; @@ -1095,8 +1094,6 @@ iobuf_info_dump (struct iobuf *iobuf, const char *key_prefix) GF_VALIDATE_OR_GOTO ("iobuf", iobuf, out); - memset(&my_iobuf, 0, sizeof(my_iobuf)); - ret = TRY_LOCK(&iobuf->lock); if (ret) { return; @@ -1155,8 +1152,6 @@ iobuf_stats_dump (struct iobuf_pool *iobuf_pool) GF_VALIDATE_OR_GOTO ("iobuf", iobuf_pool, out); - memset(msg, 0, sizeof(msg)); - ret = pthread_mutex_trylock(&iobuf_pool->mutex); if (ret) { -- cgit