summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4acbb35)
raw | patch | inline | side by side (parent: 4acbb35)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 23 Apr 2016 10:00:37 +0000 (12:00 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 23 Apr 2016 10:00:37 +0000 (12:00 +0200) |
[src/daemon/common.c:338]: (style) Checking if unsigned variable 'fields_num' is less than zero.
src/daemon/common.c | patch | blob | history |
diff --git a/src/daemon/common.c b/src/daemon/common.c
index aedf8b27ccfe1c090bea8d6dd80323666376edac..546da3b3f240e94d019e15d20036fca20755fa16 100644 (file)
--- a/src/daemon/common.c
+++ b/src/daemon/common.c
size_t sep_len;
size_t i;
- if ((buffer_size < 1) || (fields_num <= 0))
+ if ((buffer_size < 1) || (fields_num == 0))
return (-1);
memset (buffer, 0, buffer_size);