From: Ruben Kerkhof Date: Sat, 23 Apr 2016 10:01:27 +0000 (+0200) Subject: collectd.c: dirlen is unsigned X-Git-Tag: collectd-5.6.0~329^2~10 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e88be91ffc1d4ea252f19d5c126390285bd0917e;p=collectd.git collectd.c: dirlen is unsigned [src/daemon/collectd.c:199]: (style) Checking if unsigned variable 'dirlen' is less than zero. --- 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); }