summaryrefslogtreecommitdiff
path: root/src/network/lookup_serv.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-09-05 13:49:47 -0400
committerRich Felker <dalias@aerifal.cx>2014-09-05 13:49:47 -0400
commit4ec2d25a6aba30781640b84160002ed3e7fee051 (patch)
tree22bd5832f7430e863d08a1cc164f4db5b325736c /src/network/lookup_serv.c
parent4674809bdf7a46041ac0152eea0a6363ceeca548 (diff)
downloadmusl-4ec2d25a6aba30781640b84160002ed3e7fee051.tar.gz
remove incorrect and useless check in network service name lookup code
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.
Diffstat (limited to 'src/network/lookup_serv.c')
-rw-r--r--src/network/lookup_serv.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/network/lookup_serv.c b/src/network/lookup_serv.c
index bf4cba09..a9be0f3d 100644
--- 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;