summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/nvmutil/nvmutil.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index 2af10373..abd788fc 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -72,11 +72,11 @@ cmd_setmac(void)
if (invalidMacAddress(strMac, mac))
err(errno = ECANCELED, "Bad MAC address");
for (int partnum = 0; partnum < 2; partnum++) {
- if (validChecksum(part = partnum)) {
- for (int w = 0; w < 3; w++)
- setWord(w, partnum, mac[w]);
- cmd_setchecksum();
- }
+ if (!validChecksum(part = partnum))
+ continue;
+ for (int w = 0; w < 3; w++)
+ setWord(w, partnum, mac[w]);
+ cmd_setchecksum();
}
}