summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a8c59c6)
raw | patch | inline | side by side (parent: a8c59c6)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 23 Apr 2016 10:01:27 +0000 (12:01 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 23 Apr 2016 10:01:27 +0000 (12:01 +0200) |
[src/daemon/collectd.c:199]: (style) Checking if unsigned variable 'dirlen' is less than zero.
src/daemon/collectd.c | patch | blob | history |
diff --git a/src/daemon/collectd.c b/src/daemon/collectd.c
index 6f299174ad8ea38af32fc630d47f208905864dea..2576789cf582704ef58080567f585d31cbe538d6 100644 (file)
--- a/src/daemon/collectd.c
+++ b/src/daemon/collectd.c
while ((dirlen > 0) && (dir[dirlen - 1] == '/'))
dir[--dirlen] = '\0';
- if (dirlen <= 0) {
+ if (dirlen == 0) {
free (dir);
return (-1);
}