From e88be91ffc1d4ea252f19d5c126390285bd0917e Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 23 Apr 2016 12:01:27 +0200 Subject: [PATCH] collectd.c: dirlen is unsigned [src/daemon/collectd.c:199]: (style) Checking if unsigned variable 'dirlen' is less than zero. --- src/daemon/collectd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/collectd.c b/src/daemon/collectd.c index 6f299174..2576789c 100644 --- a/src/daemon/collectd.c +++ b/src/daemon/collectd.c @@ -196,7 +196,7 @@ static int change_basedir (const char *orig_dir) while ((dirlen > 0) && (dir[dirlen - 1] == '/')) dir[--dirlen] = '\0'; - if (dirlen <= 0) { + if (dirlen == 0) { free (dir); return (-1); } -- 2.30.2