util/nvmutil: fix faulty arg check

in practise, no other condition would be met and the
program still worked. this is a pre-emptive fix.
fsdg20230625
Leah Rowe 2023-06-03 15:08:29 +01:00
parent 270693fc92
commit dbd6defe9a
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ main(int argc, char *argv[])
xpledge("stdio rpath wpath unveil", NULL); xpledge("stdio rpath wpath unveil", NULL);
for (int i = 0; i < 6; i++) for (int i = 0; i < 6; i++)
if (strcmp(COMMAND, op[i].str) == 0) if (strcmp(COMMAND, op[i].str) == 0)
if (!(cmd = argc >= op[i].args ? op[i].cmd : NULL)) if ((cmd = argc >= op[i].args ? op[i].cmd : NULL))
break; break;
if (cmd == cmd_setmac) if (cmd == cmd_setmac)
strMac = (argc > 3) ? MAC_ADDRESS : strRMac; strMac = (argc > 3) ? MAC_ADDRESS : strRMac;