diff options
author | Slaven Rezic <slaven@rezic.de> | 2002-12-08 02:54:37 +0100 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2002-12-08 20:31:42 +0000 |
commit | 2b872ccad44e83808aafa1913f65a140f4c316a7 (patch) | |
tree | ea24a0e3186413af964ba39ed2aa611add03fd2d /pp_sys.c | |
parent | d085cc716f2bb280bae09a8c1f4d4c39396a0635 (diff) | |
download | perl-2b872ccad44e83808aafa1913f65a140f4c316a7.tar.gz |
getservbyport() should accept an empty string as its
proto argument (as does getservbyname()).
Subject: Re: Is this a bug or am I being stupid?
Message-ID: <87znrhl48i.fsf@vran.herceg.de>
p4raw-id: //depot/perl@18262
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -4952,6 +4952,9 @@ PP(pp_gservent) char *proto = POPpbytex; unsigned short port = (unsigned short)POPu; + if (proto && !*proto) + proto = Nullch; + #ifdef HAS_HTONS port = PerlSock_htons(port); #endif |