Module: monitoring-plugins
 Branch: master
 Commit: 8eaccee190734a12763a51aaa8a46f324f6742ec
 Author: Wolfgang Karall-Ahlborn <off...@karall-edv.at>
   Date: Sun Jan  3 11:27:44 2021 +0100
    URL: 
https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=8eaccee

check_procs -- exchange needle and haystack in strstr() for proper state match

---

 plugins/check_procs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index f7917c3..0de6be9 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -265,7 +265,7 @@ main (int argc, char **argv)
                                }
                        }
 
-                       if ((options & STAT) && (strstr (statopts, procstat)))
+                       if ((options & STAT) && (strstr (procstat, statopts)))
                                resultsum |= STAT;
                        if ((options & ARGS) && procargs && (strstr (procargs, 
args) != NULL))
                                resultsum |= ARGS;

Reply via email to