From 0f3703e641f0f995a8abb40056cb5430b6c228c4 Mon Sep 17 00:00:00 2001 From: Jan Wagner Date: Fri, 14 Apr 2023 14:37:47 +0000 Subject: Fix a lot of typos reported by codespell --- plugins/runcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins/runcmd.c') diff --git a/plugins/runcmd.c b/plugins/runcmd.c index a7155d27..1bd2ca1f 100644 --- a/plugins/runcmd.c +++ b/plugins/runcmd.c @@ -203,7 +203,7 @@ np_runcmd_open(const char *cmdstring, int *pfd, int *pfderr) } /* parent picks up execution here */ - /* close childs descriptors in our address space */ + /* close children descriptors in our address space */ close(pfd[1]); close(pfderr[1]); -- cgit v1.2.3-74-g34f1 From 1568940b3ea871ffb29d9bf1990cfa0528712b8d Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Sun, 5 Mar 2023 10:09:45 +0100 Subject: Implicit function declarations --- plugins/runcmd.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'plugins/runcmd.c') diff --git a/plugins/runcmd.c b/plugins/runcmd.c index 1bd2ca1f..c1d675d0 100644 --- a/plugins/runcmd.c +++ b/plugins/runcmd.c @@ -44,6 +44,8 @@ # include #endif +#include "./utils.h" + /** macros **/ #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) -- cgit v1.2.3-74-g34f1 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(-) (limited to 'plugins/runcmd.c') 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