Commit bc29813a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Remove dead code (VLC only uses port numbers, not service names ever)

parent 42f6cf04
...@@ -402,33 +402,9 @@ getaddrinfo (const char *node, const char *service, ...@@ -402,33 +402,9 @@ getaddrinfo (const char *node, const char *service,
char *end; char *end;
d = strtoul (service, &end, 0); d = strtoul (service, &end, 0);
if (end[0] /* service is not a number */ if (end[0] || (d > 65535u))
|| (d > 65535))
{
struct servent *entry;
const char *protoname;
switch (protocol)
{
case IPPROTO_TCP:
protoname = "tcp";
break;
case IPPROTO_UDP:
protoname = "udp";
break;
default:
protoname = NULL;
}
entry = getservbyname (service, protoname);
if (entry == NULL)
return EAI_SERVICE; return EAI_SERVICE;
port = entry->s_port;
}
else
port = htons ((u_short)d); port = htons ((u_short)d);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment