summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index fc7388083e..2f7a07f864 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -953,7 +953,7 @@ sock_getaddrinfo(VALUE host, VALUE port, struct addrinfo *hints)
struct addrinfo *r;
r = res;
while (r) {
- if (! r->ai_socktype) r->ai_socktype = hints.ai_socktype;
+ if (! r->ai_socktype) r->ai_socktype = hints->ai_socktype;
if (! r->ai_protocol) {
if (r->ai_socktype == SOCK_DGRAM) {
r->ai_protocol = IPPROTO_UDP;