mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-19 09:32:27 +02:00
util/nvmutil: tidy up final cmd check in set_cmd
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -159,7 +159,9 @@ set_cmd(int argc, char *argv[])
|
|||||||
err_if((errno = (!((part = PARTN[0] - '0') == 0 || part == 1))
|
err_if((errno = (!((part = PARTN[0] - '0') == 0 || part == 1))
|
||||||
|| PARTN[1] ? EINVAL : errno)); /* only allow '0' or '1' */
|
|| PARTN[1] ? EINVAL : errno)); /* only allow '0' or '1' */
|
||||||
}
|
}
|
||||||
err_if((errno = (cmd == NULL) ? EINVAL : errno));
|
|
||||||
|
if (cmd == NULL)
|
||||||
|
err(set_err(EINVAL), "Bad command");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user