aboutsummaryrefslogtreecommitdiff
path: root/nss/nss_files/files-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/nss_files/files-service.c')
-rw-r--r--nss/nss_files/files-service.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nss/nss_files/files-service.c b/nss/nss_files/files-service.c
index b63fafc..369b27bf 100644
--- a/nss/nss_files/files-service.c
+++ b/nss/nss_files/files-service.c
@@ -53,7 +53,7 @@ DB_LOOKUP (servbyport, 21 + (proto ? strlen (proto) : 0),
("=%d/%s", ntohs (port), proto ?: ""),
{
/* Must match both port and protocol. */
- if (result->s_port == ntohs (port)
+ if (result->s_port == port
&& (proto == NULL
|| strcmp (result->s_proto, proto) == 0))
break;