Code

Processes: in ps_read_status fix check to skip lines
authorManuel Luis Sanmartín Rozada <manuel.luis@gmail.com>
Sat, 30 May 2015 22:52:18 +0000 (00:52 +0200)
committerManuel Luis Sanmartín Rozada <manuel.luis@gmail.com>
Sat, 30 May 2015 22:52:18 +0000 (00:52 +0200)
if it doesn't start with "Vm" and it doesn't start "Threads".

src/processes.c

index d65ffb66a5cd6f576e5da071c9ef96ecbed6dd10..1c5b96308eb8275d3b2213f3ee0be0923ebcb2f6 100644 (file)
@@ -828,7 +828,7 @@ static procstat_t *ps_read_status (int pid, procstat_t *ps)
                char *endptr;
 
                if (strncmp (buffer, "Vm", 2) != 0
-                               || strncmp (buffer, "Threads", 7) != 0)
+                               && strncmp (buffer, "Threads", 7) != 0)
                        continue;
 
                numfields = strsplit (buffer, fields,