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
+13 -12
View File
@@ -135,19 +135,20 @@ set_cmd(int argc, char *argv[])
if (argc < 2) {
usage(argv[0]);
} else if (argc > 2) {
for (i = 0; (i < items(op)) && (cmd == NULL); i++) {
if (strcmp(COMMAND, op[i].str) != 0)
continue;
if (argc >= op[i].args) {
cmd = op[i].cmd;
break;
}
err(set_err(EINVAL), "Too few args on command '%s'",
op[i].str);
}
} else { /* argc == 2 */
} else if (argc == 2) { /* argc == 2 */
cmd = cmd_setmac;
return;
}
for (i = 0; (i < items(op)) && (cmd == NULL); i++) {
if (strcmp(COMMAND, op[i].str) != 0)
continue;
if (argc >= op[i].args) {
cmd = op[i].cmd;
break;
}
err(set_err(EINVAL), "Too few args on command '%s'",
op[i].str);
}
}