summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/socket.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index e7d2300b18..7838b151a3 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -519,6 +519,7 @@ ip_addrsetup(host, port)
long i = NUM2LONG(host);
mkinetaddr(htonl(i), hbuf, sizeof(hbuf));
+ hostp = hbuf;
}
else {
char *name = STR2CSTR(host);
@@ -532,8 +533,8 @@ ip_addrsetup(host, port)
else {
strcpy(hbuf, name);
}
+ hostp = hbuf;
}
- hostp = hbuf;
if (NIL_P(port)) {
portp = 0;
}