diff options
author | Khem Raj <raj.khem@gmail.com> | 2017-05-18 17:02:14 -0700 |
---|---|---|
committer | Hans Dedecker <dedeckeh@gmail.com> | 2017-05-19 09:12:25 +0200 |
commit | a063705a03a6c5a41b5f7aed251bfb3ba5c844c3 (patch) | |
tree | 985c40b48e38ff0e03b2854a2667886df290aaf6 /system-linux.c | |
parent | e6ebe0bfcdb7df25f1d96d367e8c0ad49b1642e3 (diff) |
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 <raj.khem@gmail.com>
Diffstat (limited to 'system-linux.c')
-rw-r--r-- | system-linux.c | 4 |
1 files 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; |