commands/tr: Simplify and fix missing parameter test.

Found by: Coverity scan
This commit is contained in:
Vladimir Serbinenko 2015-01-24 21:25:42 +01:00
parent fbae51dcea
commit 6079e67926

View file

@ -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))