From 6972242126f1dbfb929dbd1c1582d973d2094d8a Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Mon, 16 Oct 2023 00:44:08 +0200 Subject: Fixes for compiler warning -Wparentheses --- plugins/check_http.c | 2 +- plugins/check_procs.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'plugins') 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) microsec_firstbyte = deltime (tv_temp); elapsed_time_firstbyte = (double)microsec_firstbyte / 1.0e6; } - while (pos = memchr(buffer, '\0', i)) { + while ((pos = memchr(buffer, '\0', i))) { /* replace nul character with a blank */ *pos = ' '; } 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) /* Ignore self */ if ((usepid && mypid == procpid) || - (!usepid && ((ret = stat_exe(procpid, &statbuf) != -1) && statbuf.st_dev == mydev && statbuf.st_ino == myino) || - (ret == -1 && errno == ENOENT))) { + ( ((!usepid) && ((ret = stat_exe(procpid, &statbuf) != -1) && statbuf.st_dev == mydev && statbuf.st_ino == myino)) || + (ret == -1 && errno == ENOENT)) + ) { if (verbose >= 3) printf("not considering - is myself or gone\n"); continue; -- cgit v1.2.3-74-g34f1