util/nvmutil: fix arg_cmd initialisation

i declare it, using the 3rd argument, which might
not be available if only the file name is declared.

this fixes that.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-03 16:20:51 +00:00
parent 61fa94d0d2
commit 49c2940421
+1 -2
View File
@@ -130,14 +130,13 @@ static void
set_cmd(int argc, char *argv[])
{
size_t i;
const char *arg_cmd = argv[2];
if (argc == 2) {
cmd = cmd_setmac;
return;
}
arg_cmd = argv[2];
const char *arg_cmd = argv[2];
for (i = 0; (i < items(ops)) && (cmd == NULL); i++) {
if (strcmp(arg_cmd, ops[i].str) != 0)