From: Khem Raj Date: Fri, 19 May 2017 00:02:14 +0000 (-0700) Subject: system-linux: remove redundant check for strtoul() return value X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=commitdiff_plain;h=a063705a03a6c5a41b5f7aed251bfb3ba5c844c3 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 --- 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;