processes plugin: ps->num_lwp is unsigned long
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 08:46:29 +0000 (10:46 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 08:46:29 +0000 (10:46 +0200)
[src/processes.c:1095]: (style) Checking if unsigned variable 'num_lwp' is less than zero.

src/processes.c

index 4f2283f..5a795b5 100644 (file)
@@ -1092,7 +1092,7 @@ static int ps_read_process (long pid, procstat_t *ps, char *state)
                        ps->vmem_code = -1;
                        DEBUG("ps_read_process: did not get vmem data for pid %li", pid);
                }
-               if (ps->num_lwp <= 0)
+               if (ps->num_lwp == 0)
                        ps->num_lwp = 1;
                ps->num_proc = 1;
        }