diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/xconnect.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libbb/xconnect.c b/libbb/xconnect.c index 10ba9477c..29b984720 100644 --- a/libbb/xconnect.c +++ b/libbb/xconnect.c | |||
@@ -39,9 +39,9 @@ unsigned short bb_lookup_port(const char *port, unsigned short default_port) | |||
39 | if (errno != 0 || *endptr!='\0' || endptr==port || port_long < 0 || port_long > 65535) { | 39 | if (errno != 0 || *endptr!='\0' || endptr==port || port_long < 0 || port_long > 65535) { |
40 | struct servent *tserv = getservbyname(port, "tcp"); | 40 | struct servent *tserv = getservbyname(port, "tcp"); |
41 | if (tserv) { | 41 | if (tserv) { |
42 | port_nr = tserv->s_port; | 42 | port_nr = tserv->s_port; |
43 | } | 43 | } |
44 | } else { | 44 | } else { |
45 | port_nr = htons(port_long); | 45 | port_nr = htons(port_long); |
46 | } | 46 | } |
47 | errno = old_errno; | 47 | errno = old_errno; |