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

This commit is contained in:
Wolfgang Karall-Ahlborn 2021-01-03 11:27:44 +01:00
parent 180e069169
commit 8eaccee190

View file

@ -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;