From a625650c4a7fc93716df59e5a5e20482f4e90a76 Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Wed, 28 Sep 2016 14:58:43 +1000 Subject: [PATCH] Remove unnecessary NULL checks in assigncmd() and stubcmd() In both cases, the args pointer has already been dereferenced so it cannot be NULL. --- source/alias.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/alias.c b/source/alias.c index 315f900..0af8ea3 100644 --- a/source/alias.c +++ b/source/alias.c @@ -384,7 +384,7 @@ BUILT_IN_COMMAND(assigncmd) * If there is no body, then the user probably wants to delete * the variable */ - if (!args || !*args) + if (!*args) { /* * 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 * item is referenced. This is not optional. */ - if (!args || !*args) + if (!*args) { error("Missing file name"); return;