projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4674809
)
remove incorrect and useless check in network service name lookup code
author
Rich Felker
<dalias@aerifal.cx>
Fri, 5 Sep 2014 17:49:47 +0000
(13:49 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Fri, 5 Sep 2014 17:49:47 +0000
(13:49 -0400)
the condition was probably intended to be !*p rather than !p, but
neither is needed here. the subsequent code naturally handles the case
where it's already at end of string.
src/network/lookup_serv.c
patch
|
blob
|
history
diff --git
a/src/network/lookup_serv.c
b/src/network/lookup_serv.c
index bf4cba090390b29caed18c59ed0eae8bcb6c6d6b..a9be0f3d4a9eab4155b57559f86148589187aa47 100644
(file)
--- a/
src/network/lookup_serv.c
+++ b/
src/network/lookup_serv.c
@@
-52,7
+52,6
@@
int __lookup_serv(struct service buf[static MAXSERVS], const char *name, int pro
/* Skip past canonical name at beginning of line */
for (p=line; *p && !isspace(*p); p++);
- if (!p) continue;
port = strtoul(p, &z, 10);
if (port > 65535 || z==p) continue;