util/nvmutil: tidy up set_cmd

reduced indentation

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2026-03-03 15:56:06 +00:00
parent 6d8cf8909f
commit f1ee2ff630
+5 -4
View File
@@ -135,7 +135,11 @@ set_cmd(int argc, char *argv[])
if (argc < 2) { if (argc < 2) {
usage(argv[0]); usage(argv[0]);
} else if (argc > 2) { } else if (argc == 2) { /* argc == 2 */
cmd = cmd_setmac;
return;
}
for (i = 0; (i < items(op)) && (cmd == NULL); i++) { for (i = 0; (i < items(op)) && (cmd == NULL); i++) {
if (strcmp(COMMAND, op[i].str) != 0) if (strcmp(COMMAND, op[i].str) != 0)
continue; continue;
@@ -146,9 +150,6 @@ set_cmd(int argc, char *argv[])
err(set_err(EINVAL), "Too few args on command '%s'", err(set_err(EINVAL), "Too few args on command '%s'",
op[i].str); op[i].str);
} }
} else { /* argc == 2 */
cmd = cmd_setmac;
}
} }
static void static void