From a00c412e7ba1474b32f478daf039d2bdf71f072a Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Sun, 12 Mar 2023 14:59:23 +0100 Subject: Fixes for -Wnonnull-compare --- lib/utils_cmd.c | 4 ---- plugins/runcmd.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/lib/utils_cmd.c b/lib/utils_cmd.c index 8b8e5708..34fb3909 100644 --- a/lib/utils_cmd.c +++ b/lib/utils_cmd.c @@ -118,10 +118,6 @@ _cmd_open (char *const *argv, int *pfd, int *pfderr) int i = 0; - /* if no command was passed, return with no error */ - if (argv == NULL) - return -1; - if (!_cmd_pids) CMD_INIT; diff --git a/plugins/runcmd.c b/plugins/runcmd.c index 1bd2ca1f..ff1987fd 100644 --- a/plugins/runcmd.c +++ b/plugins/runcmd.c @@ -114,10 +114,6 @@ np_runcmd_open(const char *cmdstring, int *pfd, int *pfderr) env[0] = strdup("LC_ALL=C"); env[1] = '\0'; - /* if no command was passed, return with no error */ - if (cmdstring == NULL) - return -1; - /* make copy of command string so strtok() doesn't silently modify it */ /* (the calling program may want to access it later) */ cmdlen = strlen(cmdstring); -- cgit v1.2.3-74-g34f1