mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-20 23:42:16 +02:00
util/nvmutil: don't use err_if on argc check
at this stage in the code, the file name will be NULL value, so it would be improper to use it in a string. Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -73,7 +73,8 @@ void (*cmd)(void) = NULL;
|
|||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
err_if((errno = argc < 3 ? EINVAL : errno));
|
if (argc < 3)
|
||||||
|
err(errno = ECANCELED, "Too few arguments");
|
||||||
flags = (strcmp(COMMAND, "dump") == 0) ? O_RDONLY : flags;
|
flags = (strcmp(COMMAND, "dump") == 0) ? O_RDONLY : flags;
|
||||||
filename = argv[1];
|
filename = argv[1];
|
||||||
#ifdef __OpenBSD__
|
#ifdef __OpenBSD__
|
||||||
|
|||||||
Reference in New Issue
Block a user