From: Ruben Kerkhof Date: Sat, 23 Apr 2016 08:48:11 +0000 (+0200) Subject: olsrd plugin: buffer_len is unsigned X-Git-Tag: collectd-5.6.0~329^2~33 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=176fcb820b1dd6f041406d9ed94d4a7e189b8965;p=collectd.git olsrd plugin: buffer_len is unsigned [src/olsrd.c:666]: (style) Checking if unsigned variable 'buffer_len' is less than zero. --- diff --git a/src/olsrd.c b/src/olsrd.c index 6be7cb58..6d22d98a 100644 --- a/src/olsrd.c +++ b/src/olsrd.c @@ -611,7 +611,7 @@ static int olsrd_read_table (FILE *fh, /* {{{ */ { /* An empty line ends the table. */ buffer_len = strchomp (buffer); - if (buffer_len <= 0) + if (buffer_len == 0) { (*callback) (lineno, /* fields_num = */ 0, /* fields = */ NULL); break; @@ -663,7 +663,7 @@ static int olsrd_read (void) /* {{{ */ while (fgets (buffer, sizeof (buffer), fh) != NULL) { buffer_len = strchomp (buffer); - if (buffer_len <= 0) + if (buffer_len == 0) continue; if (strcmp ("Table: Links", buffer) == 0)