summaryrefslogtreecommitdiff
path: root/ext/socket/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/socket.c')
-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 adf622c118..f4ee19e11e 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -487,7 +487,7 @@ ip_addrsetup(host, port)
if (*name == 0) {
mkinetaddr(INADDR_ANY, hbuf, sizeof(hbuf));
}
- if (name[0] == '<' && strcmp(name, "<broadcast>") == 0) {
+ else if (name[0] == '<' && strcmp(name, "<broadcast>") == 0) {
mkinetaddr(INADDR_BROADCAST, hbuf, sizeof(hbuf));
}
else {
@@ -594,6 +594,7 @@ ruby_socket(domain, type, proto)
fd = socket(domain, type, proto);
}
}
+ return fd;
}
static int