projects
/
project
/
netifd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
system-linux: remove redundant check for strtoul() return value
[project/netifd.git]
/
system-linux.c
diff --git
a/system-linux.c
b/system-linux.c
index
3e11bdf
..
ddc31d8
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;