diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-16 00:44:08 +0200 |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-16 00:45:33 +0200 |
commit | 6972242126f1dbfb929dbd1c1582d973d2094d8a (patch) | |
tree | c1b1505036fdb00baba0cc17b68f46a085d17be2 /plugins | |
parent | 15b4e89a42a3caf2c4da3992d698b356649665a1 (diff) | |
download | monitoring-plugins-6972242.tar.gz |
Fixes for compiler warning -Wparentheses
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_http.c | 2 | ||||
-rw-r--r-- | plugins/check_procs.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/plugins/check_http.c b/plugins/check_http.c index 718c8ee7..b9d8145c 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c | |||
@@ -1094,7 +1094,7 @@ check_http (void) | |||
1094 | microsec_firstbyte = deltime (tv_temp); | 1094 | microsec_firstbyte = deltime (tv_temp); |
1095 | elapsed_time_firstbyte = (double)microsec_firstbyte / 1.0e6; | 1095 | elapsed_time_firstbyte = (double)microsec_firstbyte / 1.0e6; |
1096 | } | 1096 | } |
1097 | while (pos = memchr(buffer, '\0', i)) { | 1097 | while ((pos = memchr(buffer, '\0', i))) { |
1098 | /* replace nul character with a blank */ | 1098 | /* replace nul character with a blank */ |
1099 | *pos = ' '; | 1099 | *pos = ' '; |
1100 | } | 1100 | } |
diff --git a/plugins/check_procs.c b/plugins/check_procs.c index c17c6996..1637e3e3 100644 --- a/plugins/check_procs.c +++ b/plugins/check_procs.c | |||
@@ -241,8 +241,9 @@ main (int argc, char **argv) | |||
241 | 241 | ||
242 | /* Ignore self */ | 242 | /* Ignore self */ |
243 | if ((usepid && mypid == procpid) || | 243 | if ((usepid && mypid == procpid) || |
244 | (!usepid && ((ret = stat_exe(procpid, &statbuf) != -1) && statbuf.st_dev == mydev && statbuf.st_ino == myino) || | 244 | ( ((!usepid) && ((ret = stat_exe(procpid, &statbuf) != -1) && statbuf.st_dev == mydev && statbuf.st_ino == myino)) || |
245 | (ret == -1 && errno == ENOENT))) { | 245 | (ret == -1 && errno == ENOENT)) |
246 | ) { | ||
246 | if (verbose >= 3) | 247 | if (verbose >= 3) |
247 | printf("not considering - is myself or gone\n"); | 248 | printf("not considering - is myself or gone\n"); |
248 | continue; | 249 | continue; |