summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorPerl 5 Porters <perl5-porters.nicoh.com>1996-01-08 08:59:52 +0000
committerAndy Dougherty <doughera.lafayette.edu>1996-01-08 08:59:52 +0000
commit2c129a173eacf0ac1042dfc3673b8bd6ca3590b7 (patch)
tree0339b58b1803f5e4b917bcc3f7fdade0cdfdb314 /ext
parentb77fae6586595023b0fbf51345fc9fccc5c5aca4 (diff)
downloadperl-2c129a173eacf0ac1042dfc3673b8bd6ca3590b7.tar.gz
Use unsigned shorts for ports.
Diffstat (limited to 'ext')
-rw-r--r--ext/Socket/Socket.xs6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/Socket/Socket.xs b/ext/Socket/Socket.xs
index 191afa6032..378824f42d 100644
--- a/ext/Socket/Socket.xs
+++ b/ext/Socket/Socket.xs
@@ -678,7 +678,7 @@ unpack_sockaddr_un(sun_sv)
void
pack_sockaddr_in(port,ip_address)
- short port
+ unsigned short port
char * ip_address
CODE:
{
@@ -699,7 +699,7 @@ unpack_sockaddr_in(sin_sv)
{
STRLEN sockaddrlen;
struct sockaddr_in addr;
- short port;
+ unsigned short port;
struct in_addr ip_address;
char * sin = SvPV(sin_sv,sockaddrlen);
if (sockaddrlen != sizeof(addr)) {
@@ -718,7 +718,7 @@ unpack_sockaddr_in(sin_sv)
ip_address = addr.sin_addr;
EXTEND(sp, 2);
- PUSHs(sv_2mortal(newSViv(port)));
+ PUSHs(sv_2mortal(newSViv((IV) port)));
PUSHs(sv_2mortal(newSVpv((char *)&ip_address,sizeof ip_address)));
}