From 176fcb820b1dd6f041406d9ed94d4a7e189b8965 Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sat, 23 Apr 2016 10:48:11 +0200 Subject: [PATCH] olsrd plugin: buffer_len is unsigned [src/olsrd.c:666]: (style) Checking if unsigned variable 'buffer_len' is less than zero. --- src/olsrd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) -- 2.11.0