util/nvmutil: only set mac_updated at the end

after setting the checksum too

this is functionally no different, but setting it
at the start didn't sit right with me.

it's more logically correct to set it at the end,
in case any error did not result in an exit.

Signed-off-by: Leah Rowe <leah@libreboot.org>
20250107_branch
Leah Rowe 2025-01-29 04:45:57 +00:00
parent 438ebb1647
commit 3a3b935b8b
1 changed files with 1 additions and 1 deletions

View File

@ -268,7 +268,6 @@ cmd_setmac(void)
for (int partnum = 0; partnum < 2; partnum++) {
if (!goodChecksum(part = partnum))
continue;
mac_updated = 1;
for (int w = 0; w < 3; w++) /* write MAC to gbe part */
setWord(w, partnum, mac[w]);
@ -277,6 +276,7 @@ cmd_setmac(void)
macf(partnum);
cmd_setchecksum(); /* MAC updated; need valid checksum */
mac_updated = 1;
}
if (mac_updated)