summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/ctx.c
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-10-21 03:55:04 +0300
committerYaniv Kaul <ykaul@redhat.com>2018-11-11 16:06:29 +0000
commitcac2dba48bf8029b2b0421850fcc4598e33569f6 (patch)
tree0ce59ef4a72c4b3f0dea9bff5bec0ccfbd247796 /libglusterfs/src/ctx.c
parentdb28fc7a35b784a4ca6a361961081f93e968cfcb (diff)
libglusterfs multiple files: remove dead initilization
Per newer GCC releases and clang-scan, some trivial dead initialization (values that were set but were never read) were removed. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: Ia9959b2ff87d2e9cb46864e68ffe7dccb984db34
Diffstat (limited to 'libglusterfs/src/ctx.c')
-rw-r--r--libglusterfs/src/ctx.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libglusterfs/src/ctx.c b/libglusterfs/src/ctx.c
index 1e4c341df05..170a5752452 100644
--- a/libglusterfs/src/ctx.c
+++ b/libglusterfs/src/ctx.c
@@ -17,14 +17,12 @@
glusterfs_ctx_t *
glusterfs_ctx_new()
{
- int ret = 0;
glusterfs_ctx_t *ctx = NULL;
/* no GF_CALLOC here, gf_acct_mem_set_enable is not
yet decided at this point */
ctx = calloc(1, sizeof(*ctx));
if (!ctx) {
- ret = -1;
goto out;
}
@@ -44,8 +42,7 @@ glusterfs_ctx_new()
#endif
/* lock is never destroyed! */
- ret = LOCK_INIT(&ctx->lock);
- if (ret) {
+ if (LOCK_INIT(&ctx->lock)) {
free(ctx);
ctx = NULL;
goto out;