mirror of
git://sourceware.org/git/glibc.git
synced 2025-04-12 14:21:18 +08:00
(servbyname): Match any protocol if proto==NULL.
This commit is contained in:
parent
f42bf1bcfa
commit
59c37b6b21
@ -41,8 +41,8 @@ LINE_PARSER
|
||||
|
||||
DB_LOOKUP (servbyname, 1 + strlen (name), (".%s/%s", name, proto),
|
||||
{
|
||||
/* Must match both protocol and name. */
|
||||
if (strcmp (result->s_proto, proto))
|
||||
/* Must match both protocol (if specified) and name. */
|
||||
if (proto != NULL && strcmp (result->s_proto, proto))
|
||||
continue;
|
||||
LOOKUP_NAME (s_name, s_aliases)
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user