summaryrefslogtreecommitdiff
path: root/pp_sys.c
diff options
context:
space:
mode:
authorSlaven Rezic <slaven@rezic.de>2002-12-08 02:54:37 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2002-12-08 20:31:42 +0000
commit2b872ccad44e83808aafa1913f65a140f4c316a7 (patch)
treeea24a0e3186413af964ba39ed2aa611add03fd2d /pp_sys.c
parentd085cc716f2bb280bae09a8c1f4d4c39396a0635 (diff)
downloadperl-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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pp_sys.c b/pp_sys.c
index f1eb1b9474..472f041aa6 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -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