]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
commands/tr: Simplify and fix missing parameter test.
authorVladimir Serbinenko <phcoder@gmail.com>
Sat, 24 Jan 2015 20:25:42 +0000 (21:25 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sat, 24 Jan 2015 20:25:42 +0000 (21:25 +0100)
Found by: Coverity scan

grub-core/commands/tr.c

index 84ad6ff8f96fb9275f2645e77c2ebb5f9f7ba9f4..ef72841a2b1b98b996fe6f4d6be9b1fd9818b543 100644 (file)
@@ -80,7 +80,7 @@ grub_cmd_tr (grub_extcmd_context_t ctxt, int argc, char **args)
   } else if (argc > 3)
     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");
 
   if (grub_strlen (s1) != grub_strlen (s2))