diff options
author | Sunny Kumar <sunkumar@redhat.com> | 2018-08-15 01:59:04 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-08-17 02:49:23 +0000 |
commit | 0f0551565874498242348fbe413017d844715814 (patch) | |
tree | 0d5044587e298e75f90bf6dacb4d6c5ceefcae36 /libglusterfs | |
parent | c0b5eab4c0bb95236c18ba5c7f596e44d7ec49e1 (diff) |
statedump : fix coverity issues
Comparing an array to null is not useful, the test will always evaluate as true.
Fixes CID 1325566 and 1389371.
updates: bz#789278
Change-Id: Id51f84cc62767a432de1d12851ae2669c1596a94
Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/statedump.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/statedump.c b/libglusterfs/src/statedump.c index d769d7a9ef2..741b2b97555 100644 --- a/libglusterfs/src/statedump.c +++ b/libglusterfs/src/statedump.c @@ -223,7 +223,7 @@ gf_proc_dump_xlator_mem_info (xlator_t *xl) if (!xl) return; - if (!xl->mem_acct || !xl->mem_acct->rec) + if (!xl->mem_acct) return; gf_proc_dump_add_section ("%s.%s - Memory usage", xl->type, xl->name); @@ -258,7 +258,7 @@ gf_proc_dump_xlator_mem_info_only_in_use (xlator_t *xl) if (!xl) return; - if (!xl->mem_acct || !xl->mem_acct->rec) + if (!xl->mem_acct) return; gf_proc_dump_add_section ("%s.%s - Memory usage", xl->type, xl->name); |