projects
/
oweals
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e6ebe0b
)
system-linux: remove redundant check for strtoul() return value
author
Khem Raj
<raj.khem@gmail.com>
Fri, 19 May 2017 00:02:14 +0000
(17:02 -0700)
committer
Hans 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
patch
|
blob
|
history
diff --git
a/system-linux.c
b/system-linux.c
index 3e11bdfccbad1490755df2ddd9b69be136d9d432..ddc31d82ed182019af6b8b73959957a0874307ab 100644
(file)
--- 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;