diff options
author | yatipadia <ypadia@redhat.com> | 2019-09-16 14:45:12 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@gmail.com> | 2019-10-03 11:21:47 +0000 |
commit | f2404405432cfc7c2369de02f79eee000b9aee13 (patch) | |
tree | dfc0a6a0f3d03ccbb928ebe92395a60a621e0c4b /xlators/performance | |
parent | da331e1e5a04650d340509b4d4de8f20aea0712d (diff) |
xlators: fixes logically dead code.
This patch addresses CID-1124388.
Problem: When we reach the "out" section in ra_priv_dump(), if the condition
(ret && conf) holds true, then the value of "add_section" will always be true.
So the condition (add_section == _gf_false) will be a dead code.
Fix:"add_section" has no use in the whole block and was making part of the
block as logically dead code and hence, removed it.
Change-Id: Id7e0105fc9a5ca5b2c2d098c665e6e32ecc6b62b
updates: bz#789278
Signed-off-by: yatipadia <ypadia@redhat.com>
Diffstat (limited to 'xlators/performance')
-rw-r--r-- | xlators/performance/read-ahead/src/read-ahead.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c index 224edf0864a..e6bfd25641e 100644 --- a/xlators/performance/read-ahead/src/read-ahead.c +++ b/xlators/performance/read-ahead/src/read-ahead.c @@ -1021,7 +1021,6 @@ ra_priv_dump(xlator_t *this) char key_prefix[GF_DUMP_MAX_BUF_LEN] = { 0, }; - gf_boolean_t add_section = _gf_false; if (!this) { goto out; @@ -1037,7 +1036,6 @@ ra_priv_dump(xlator_t *this) gf_proc_dump_build_key(key_prefix, "xlator.performance.read-ahead", "priv"); gf_proc_dump_add_section("%s", key_prefix); - add_section = _gf_true; ret = pthread_mutex_trylock(&conf->conf_lock); if (ret) @@ -1053,9 +1051,6 @@ ra_priv_dump(xlator_t *this) ret = 0; out: if (ret && conf) { - if (add_section == _gf_false) - gf_proc_dump_add_section("%s", key_prefix); - gf_proc_dump_write("Unable to dump priv", "(Lock acquisition failed) %s", this->name); } |