Message ID | 20171106231610.8271-3-vishal.l.verma@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/ndctl/inject-error.c b/ndctl/inject-error.c index 4c45902..a05f813 100644 --- a/ndctl/inject-error.c +++ b/ndctl/inject-error.c @@ -250,9 +250,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.flags);
The iteration helper ndctl_namespace_bb_foreach ensures bb cannot be NULL in the loop, so an explicit check for it is not necessary. Remove it. Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> --- ndctl/inject-error.c | 3 --- 1 file changed, 3 deletions(-)