summaryrefslogtreecommitdiffstats
path: root/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2017-11-08 06:08:02 -0500
committerAmar Tumballi <amarts@redhat.com>2017-11-09 21:18:52 +0000
commit0fc1c562d8b8d09ec2b59bc525ec5635a21a4561 (patch)
tree539ce7122b452b731cd9f57f6229d56c2a7136b4 /xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
parent2899a4f125735636fe7cd8db73c0b8a13289df9b (diff)
features/bitrot: Fix coverity issues
1. br_update_scrub_finish_time: BUFFER_SIZE_WARNING 2. br_read_bad_object_dir : DEADCODE 3. bit-rot.c: init : RESOURCE_LEAK 4. br_stub_fsetxattr : STACK_USE 5. br_stub_setxattr : STACK_USE 6. bit-rot-stub.c: init : BUFFER_SIZE_WARNING Change-Id: Ie620f431bd7548fedae2152aa756ccdcd89ddf89 Signed-off-by: Kotresh HR <khiremat@redhat.com> BUG: 789278
Diffstat (limited to 'xlators/features/bit-rot/src/bitd/bit-rot-scrub.c')
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot-scrub.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
index 8812e99535a..0e706c92dff 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
@@ -1632,10 +1632,9 @@ br_read_bad_object_dir (xlator_t *this, br_child_t *child, fd_t *fd,
NULL, NULL))) {
if (ret < 0)
goto out;
- if (ret == 0)
- break;
- list_for_each_entry (entry, &entries.list, list) {
- offset = entry->d_off;
+
+ list_for_each_entry (entry, &entries.list, list) {
+ offset = entry->d_off;
snprintf (key, sizeof (key), "quarantine-%d", count);
@@ -1648,10 +1647,10 @@ br_read_bad_object_dir (xlator_t *this, br_child_t *child, fd_t *fd,
entry->d_name);
if (!ret)
count++;
- }
+ }
- gf_dirent_free (&entries);
- }
+ gf_dirent_free (&entries);
+ }
ret = count;
ret = dict_set_int32 (dict, "count", count);