chiark / gitweb /
bootchart: use the bool type where appropriate
authorLennart Poettering <lennart@poettering.net>
Mon, 11 Aug 2014 16:24:08 +0000 (18:24 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 11 Aug 2014 16:24:08 +0000 (18:24 +0200)
src/bootchart/svg.c

index bf6636cab1d8c26b0c2f9d12a2baac7869faf863..135883fb838c813a932ff7fe5cf96fdbfd48f2f3 100644 (file)
@@ -881,21 +881,21 @@ static struct ps_struct *get_next_ps(struct ps_struct *ps) {
         return NULL;
 }
 
         return NULL;
 }
 
-static int ps_filter(struct ps_struct *ps) {
+static bool ps_filter(struct ps_struct *ps) {
         if (!arg_filter)
         if (!arg_filter)
-                return 0;
+                return false;
 
         /* can't draw data when there is only 1 sample (need start + stop) */
         if (ps->first == ps->last)
 
         /* can't draw data when there is only 1 sample (need start + stop) */
         if (ps->first == ps->last)
-                return -1;
+                return true;
 
         /* don't filter kthreadd */
         if (ps->pid == 2)
 
         /* don't filter kthreadd */
         if (ps->pid == 2)
-                return 0;
+                return false;
 
         /* drop stuff that doesn't use any real CPU time */
         if (ps->total <= 0.001)
 
         /* drop stuff that doesn't use any real CPU time */
         if (ps->total <= 0.001)
-                return -1;
+                return true;
 
         return 0;
 }
 
         return 0;
 }