From bb227c48e62e8f4adebd028293b3b85d1c7db244 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 17 Sep 2009 18:02:34 +0200 Subject: [PATCH] =?utf8?q?processes=20plugin:=20Case=20argument=20of=20?= =?utf8?q?=E2=80=9Cisdigit=E2=80=9D=20to=20int.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit On some platforms passing a char there causes problems :/ --- src/processes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/processes.c b/src/processes.c index 8337f99a..fd06b21b 100644 --- a/src/processes.c +++ b/src/processes.c @@ -634,14 +634,14 @@ static int ps_read_tasks (int pid) while ((ent = readdir (dh)) != NULL) { - if (!isdigit (ent->d_name[0])) + if (!isdigit ((int) ent->d_name[0])) continue; else count++; } closedir (dh); - return (count?count:1); + return ((count >= 1) ? count : 1); } /* int *ps_read_tasks */ int ps_read_process (int pid, procstat_t *ps, char *state) -- 2.30.2