Skip to contentSkip to conversation

ndctl, test: remove an unused variable assignment

PATCH New Vishal Verma 1 participant 1 message Jun 25, 2018 libnvdimm: non-volatile memory device

lore
Share & tools
lore

Vishal Verma

author maintainer
#0 lore raw

PATCH 1/1 ndctl, test: remove an unused variable assignment

Static analysis complains that 'rc' was overwritten immediately after assigning to it, and therefore the assignment is useless. Remove it.

---
 test/dsm-fail.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
test/dsm-fail.c +1 -3
index 45a6c4f..6845f81 100644
@@ -339,11 +339,9 @@ static int do_test(struct ndctl_ctx *ctx, struct ndctl_test *test)
 	sprintf(path, "%s/fail_cmd", DIMM_PATH);
 	sprintf(buf, "0\n");
 	rc = __sysfs_write_attr(&log_ctx, path, buf);
-	if (rc) {
+	if (rc)
 		fprintf(stderr, "%s: failed to clear fail_cmd mask\n",
 				ndctl_dimm_get_devname(victim));
-		rc = -ENXIO;
-	}
 	rc = ndctl_dimm_enable(victim);
 	if (rc) {
 		fprintf(stderr, "failed to enable victim: %s after clearing error\n",
Signature · 6 lines
2.17.0

_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm