processes plugin: len is unsigned
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 08:44:43 +0000 (10:44 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 23 Apr 2016 08:44:43 +0000 (10:44 +0200)
[src/processes.c:1219]: (style) Checking if unsigned variable 'len' is less than zero.

src/processes.c

index efc64d0..4f2283f 100644 (file)
@@ -1216,7 +1216,7 @@ static char *ps_get_cmdline (long pid, char *name, char *buf, size_t buf_len)
                buf_ptr += status;
                len     -= status;
 
-               if (len <= 0)
+               if (len == 0)
                        break;
        }