summaryrefslogtreecommitdiff
path: root/util/nvmutil
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2026-03-03 16:20:51 +0000
committerLeah Rowe <leah@libreboot.org>2026-03-03 16:20:51 +0000
commit49c294042100b55b8cef059dbcd44f65e48b1775 (patch)
tree4578f2bd1b33e850cf5d8e8391cde96655ae7106 /util/nvmutil
parent61fa94d0d28afdaed60c3c53fa2d009c3fd6ff42 (diff)
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>
Diffstat (limited to 'util/nvmutil')
-rw-r--r--util/nvmutil/nvmutil.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c
index c43127e7..1033da73 100644
--- a/util/nvmutil/nvmutil.c
+++ b/util/nvmutil/nvmutil.c
@@ -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)