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>btrfsvols
parent
0897a0be17
commit
4d44820163
|
@ -73,7 +73,8 @@ void (*cmd)(void) = NULL;
|
|||
int
|
||||
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;
|
||||
filename = argv[1];
|
||||
#ifdef __OpenBSD__
|
||||
|
|
Loading…
Reference in New Issue