Message ID | 20151015210640.22046.3359.stgit@dwillia2-desk3.jf.intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 2f1fe63179e1 |
Headers | show |
diff --git a/lib/test-libndctl.c b/lib/test-libndctl.c index 423dab5c95c2..a664f0643568 100644 --- a/lib/test-libndctl.c +++ b/lib/test-libndctl.c @@ -506,7 +506,7 @@ static int check_regions(struct ndctl_bus *bus, struct region *regions, int n) if (rc) return rc; - if (regions[i].namespaces) + if (regions[i].namespaces[0]) rc = check_namespaces(region, regions[i].namespaces); if (rc) break;
Static analysis points out that we should be checking if the first entry of the array is NULL, not the presence of the array itself. Fix in case we ever implement a namespace-less region test. Signed-off-by: Dan Williams <dan.j.williams@intel.com> --- lib/test-libndctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)