commands/tr: Simplify and fix missing parameter test.
Found by: Coverity scan
This commit is contained in:
parent
fbae51dcea
commit
6079e67926
1 changed files with 1 additions and 1 deletions
|
@ -80,7 +80,7 @@ grub_cmd_tr (grub_extcmd_context_t ctxt, int argc, char **args)
|
||||||
} else if (argc > 3)
|
} else if (argc > 3)
|
||||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "too many parameters");
|
return grub_error (GRUB_ERR_BAD_ARGUMENT, "too many parameters");
|
||||||
|
|
||||||
if (argc <= 0 && (!s1 || !s2 || !input))
|
if (!s1 || !s2 || !input)
|
||||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "missing parameters");
|
return grub_error (GRUB_ERR_BAD_ARGUMENT, "missing parameters");
|
||||||
|
|
||||||
if (grub_strlen (s1) != grub_strlen (s2))
|
if (grub_strlen (s1) != grub_strlen (s2))
|
||||||
|
|
Loading…
Reference in a new issue