Remove unnecessary NULL checks in assigncmd() and stubcmd()

In both cases, the args pointer has already been dereferenced so it cannot be NULL.
This commit is contained in:
Kevin Easton
2016-09-28 14:58:43 +10:00
parent dc17b059eb
commit a625650c4a

View File

@@ -384,7 +384,7 @@ BUILT_IN_COMMAND(assigncmd)
* If there is no body, then the user probably wants to delete * If there is no body, then the user probably wants to delete
* the variable * the variable
*/ */
if (!args || !*args) if (!*args)
{ {
/* /*
* If the variable name starts with a hyphen, then we remove * If the variable name starts with a hyphen, then we remove
@@ -466,7 +466,7 @@ BUILT_IN_COMMAND(stubcmd)
* The rest of the argument(s) are the files to load when the * The rest of the argument(s) are the files to load when the
* item is referenced. This is not optional. * item is referenced. This is not optional.
*/ */
if (!args || !*args) if (!*args)
{ {
error("Missing file name"); error("Missing file name");
return; return;