From a063705a03a6c5a41b5f7aed251bfb3ba5c844c3 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 18 May 2017 17:02:14 -0700 Subject: [PATCH] system-linux: remove redundant check for strtoul() return value Fixes system-linux.c:1998:33: error: comparison of unsigned expression >= 0 is always true [-Werror,-Wtautological-compare] Signed-off-by: Khem Raj --- system-linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system-linux.c b/system-linux.c index 3e11bdf..ddc31d8 100644 --- a/system-linux.c +++ b/system-linux.c @@ -1988,8 +1988,8 @@ bool system_resolve_rt_proto(const char *type, unsigned int *id) FILE *f; char *e, buf[128]; unsigned int n, proto = 256; - - if ((n = strtoul(type, &e, 0)) >= 0 && !*e && e != type) + n = strtoul(type, &e, 0); + if (!*e && e != type) proto = n; else if (!strcmp(type, "unspec")) proto = RTPROT_UNSPEC; -- 2.11.0