system-linux: remove redundant check for strtoul() return value
[project/netifd.git] / system-linux.c
index 3e11bdfccbad1490755df2ddd9b69be136d9d432..ddc31d82ed182019af6b8b73959957a0874307ab 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;