diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2018-08-23 09:21:02 +0300 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-08-24 05:39:52 +0000 |
commit | f75823f6fcb8aa3116f712ed69fbf4b35d4c3bdd (patch) | |
tree | 0d649ffc2f738b1eeb0845fcbb495531965266fc /libglusterfs/src/iobuf.c | |
parent | 2785d2fdf710fcd323bef2d1cbbf17fe823a289f (diff) |
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 <ykaul@redhat.com>
Change-Id: Ia019775ad5255190f5d02d948ea27db7f563387d
Diffstat (limited to 'libglusterfs/src/iobuf.c')
-rw-r--r-- | libglusterfs/src/iobuf.c | 7 |
1 files changed, 1 insertions, 6 deletions
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) { |