diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-12-29 00:45:14 +0100 |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-12-29 00:45:14 +0100 |
commit | c1c9abbfcafe8e55d86dfe13aed6874ad194d761 (patch) | |
tree | edace8eb0bc721c6f331d4fe4c8356b8094ac4a9 | |
parent | bad156676894a2755c8b76519a11cdd2037e5cd6 (diff) | |
download | monitoring-plugins-c1c9abb.tar.gz |
Change iritating NULL assignment
-rw-r--r-- | plugins/popen.c | 2 | ||||
-rw-r--r-- | plugins/runcmd.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/popen.c b/plugins/popen.c index 036bc608..54e63bc5 100644 --- a/plugins/popen.c +++ b/plugins/popen.c | |||
@@ -105,7 +105,7 @@ spopen (const char *cmdstring) | |||
105 | #endif | 105 | #endif |
106 | 106 | ||
107 | env[0] = strdup("LC_ALL=C"); | 107 | env[0] = strdup("LC_ALL=C"); |
108 | env[1] = '\0'; | 108 | env[1] = NULL; |
109 | 109 | ||
110 | /* if no command was passed, return with no error */ | 110 | /* if no command was passed, return with no error */ |
111 | if (cmdstring == NULL) | 111 | if (cmdstring == NULL) |
diff --git a/plugins/runcmd.c b/plugins/runcmd.c index 32fd6b96..ed49bb99 100644 --- a/plugins/runcmd.c +++ b/plugins/runcmd.c | |||
@@ -115,7 +115,7 @@ np_runcmd_open(const char *cmdstring, int *pfd, int *pfderr) | |||
115 | if(!np_pids) NP_RUNCMD_INIT; | 115 | if(!np_pids) NP_RUNCMD_INIT; |
116 | 116 | ||
117 | env[0] = strdup("LC_ALL=C"); | 117 | env[0] = strdup("LC_ALL=C"); |
118 | env[1] = '\0'; | 118 | env[1] = NULL; |
119 | 119 | ||
120 | /* make copy of command string so strtok() doesn't silently modify it */ | 120 | /* make copy of command string so strtok() doesn't silently modify it */ |
121 | /* (the calling program may want to access it later) */ | 121 | /* (the calling program may want to access it later) */ |