projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a8c59c6
)
collectd.c: dirlen is unsigned
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
6f29917
..
2576789
100644
(file)
--- 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);
}