summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/fd.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/fd.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/fd.c')
-rw-r--r--libglusterfs/src/fd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c
index 6c521317110..25edcbdd387 100644
--- a/libglusterfs/src/fd.c
+++ b/libglusterfs/src/fd.c
@@ -1131,6 +1131,8 @@ fdentry_dump_to_dict(fdentry_t *fdentry, char *prefix, dict_t *dict,
snprintf(key, sizeof(key), "%s.flags", prefix);
ret = dict_set_int32(dict, key, fdentry->fd->flags);
+ if (ret)
+ return;
(*openfds)++;
}
@@ -1180,6 +1182,8 @@ fdtable_dump_to_dict(fdtable_t *fdtable, char *prefix, dict_t *dict)
snprintf(key, sizeof(key), "%s.fdtable.openfds", prefix);
ret = dict_set_int32(dict, key, openfds);
+ if (ret)
+ goto out;
out:
pthread_rwlock_unlock(&fdtable->lock);