mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
util/nvmutil: declare arg_cmd earlier
set it after the argc check i don't like initialising a const after declaration, but it compiles, and it keeps with the style used in the rest of the code. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -130,13 +130,14 @@ static void
|
||||
set_cmd(int argc, char *argv[])
|
||||
{
|
||||
size_t i;
|
||||
const char *arg_cmd;
|
||||
|
||||
if (argc == 2) {
|
||||
cmd = cmd_setmac;
|
||||
return;
|
||||
}
|
||||
|
||||
const char *arg_cmd = argv[2];
|
||||
arg_cmd = argv[2];
|
||||
|
||||
for (i = 0; (i < items(ops)) && (cmd == NULL); i++) {
|
||||
if (strcmp(arg_cmd, ops[i].str) != 0)
|
||||
|
||||
Reference in New Issue
Block a user