[monitoring-plugins] Change iritating NULL assignment
RincewindsHat
git at monitoring-plugins.org
Sat Dec 30 20:40:13 CET 2023
Module: monitoring-plugins
Branch: master
Commit: c1c9abbfcafe8e55d86dfe13aed6874ad194d761
Author: RincewindsHat <12514511+RincewindsHat at users.noreply.github.com>
Date: Fri Dec 29 00:45:14 2023 +0100
URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=c1c9abb
Change iritating NULL assignment
---
plugins/popen.c | 2 +-
plugins/runcmd.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/popen.c b/plugins/popen.c
index 036bc60..54e63bc 100644
--- a/plugins/popen.c
+++ b/plugins/popen.c
@@ -105,7 +105,7 @@ spopen (const char *cmdstring)
#endif
env[0] = strdup("LC_ALL=C");
- env[1] = '\0';
+ env[1] = NULL;
/* if no command was passed, return with no error */
if (cmdstring == NULL)
diff --git a/plugins/runcmd.c b/plugins/runcmd.c
index 32fd6b9..ed49bb9 100644
--- a/plugins/runcmd.c
+++ b/plugins/runcmd.c
@@ -115,7 +115,7 @@ np_runcmd_open(const char *cmdstring, int *pfd, int *pfderr)
if(!np_pids) NP_RUNCMD_INIT;
env[0] = strdup("LC_ALL=C");
- env[1] = '\0';
+ env[1] = NULL;
/* make copy of command string so strtok() doesn't silently modify it */
/* (the calling program may want to access it later) */
More information about the Commits
mailing list