Skip to content

Commit

Permalink
ndctl/inject-error: remove logically dead code
Browse files Browse the repository at this point in the history
Static analysis reports that the bb != NULL check is redundant because
ndctl_namespace_bb_foreach already uses that as a loop condition. Remove
it.

Signed-off-by: Vishal Verma <[email protected]>
  • Loading branch information
stellarhopper committed Oct 1, 2020
1 parent 56e26ee commit 17bbac2
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions ndctl/inject-error.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,6 @@ static int injection_status(struct ndctl_namespace *ndns)
}

ndctl_namespace_bb_foreach(ndns, bb) {
if (!bb)
break;

block = ndctl_bb_get_block(bb);
count = ndctl_bb_get_count(bb);
jbb = util_badblock_rec_to_json(block, count, ictx.json_flags);
Expand Down

0 comments on commit 17bbac2

Please sign in to comment.