From: Ruben Kerkhof Date: Sat, 23 Apr 2016 10:00:37 +0000 (+0200) Subject: common.c: fields_num is unsigned X-Git-Tag: collectd-5.6.0~329^2~11 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=a8c59c6d75efe3656b2f019ddefb2ce6cb2cbb2e;p=collectd.git common.c: fields_num is unsigned [src/daemon/common.c:338]: (style) Checking if unsigned variable 'fields_num' is less than zero. --- diff --git a/src/daemon/common.c b/src/daemon/common.c index aedf8b27..546da3b3 100644 --- a/src/daemon/common.c +++ b/src/daemon/common.c @@ -335,7 +335,7 @@ int strjoin (char *buffer, size_t buffer_size, 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);