system-linux: remove redundant check for strtoul() return value
authorKhem Raj <raj.khem@gmail.com>
Fri, 19 May 2017 00:02:14 +0000 (17:02 -0700)
committerHans Dedecker <dedeckeh@gmail.com>
Fri, 19 May 2017 07:12:25 +0000 (09:12 +0200)
Fixes
system-linux.c:1998:33: error: comparison of unsigned expression >= 0 is always true [-Werror,-Wtautological-compare]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
system-linux.c

index 3e11bdf..ddc31d8 100644 (file)
@@ -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;