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 d65ffb6..1c5b963 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,