From c285dbd37266b9ab0bcbcd994e58cf45a3fb492f Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Wed, 14 Jun 2023 10:56:11 +0100 Subject: util/nvmutil: reduced indentation inside loop Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 10 +++++----- 1 file 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(); } } -- cgit v1.2.1