diff mbox

[ndctl,4/6] test, libndctl: fix uninitialized variable usage in check_btt_size()

Message ID 147432107740.39548.1060602141777439986.stgit@dwillia2-desk3.amr.corp.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Dan Williams Sept. 19, 2016, 9:38 p.m. UTC
If the namespace size is not one we expect, fail the test.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 test/libndctl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/test/libndctl.c b/test/libndctl.c
index e36fe8a4fe6f..a0bf74a9c333 100644
--- a/test/libndctl.c
+++ b/test/libndctl.c
@@ -984,7 +984,7 @@  static int check_btt_size(struct ndctl_btt *btt)
 		fprintf(stderr, "%s: %s unexpected namespace size: %llx\n",
 				__func__, ndctl_namespace_get_devname(ndns),
 				ns_size);
-		break;
+		return -ENXIO;
 	}
 
 	expect = expect_table[size_select][sect_select];