aboutsummaryrefslogtreecommitdiffstats
path: root/ext/socket
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/basicsocket.c2
-rw-r--r--ext/socket/unixsocket.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/basicsocket.c b/ext/socket/basicsocket.c
index b997043620..c1ae88d80c 100644
--- a/ext/socket/basicsocket.c
+++ b/ext/socket/basicsocket.c
@@ -247,7 +247,7 @@ bsock_setsockopt(int argc, VALUE *argv, VALUE sock)
break;
}
-#define rb_sys_fail_path(path) rb_sys_fail(NIL_P(path) ? 0 : RSTRING_PTR(path))
+#define rb_sys_fail_path(path) rb_sys_fail_str(path)
rb_io_check_closed(fptr);
if (setsockopt(fptr->fd, level, option, v, vlen) < 0)
diff --git a/ext/socket/unixsocket.c b/ext/socket/unixsocket.c
index 2954cef433..afa47d54f6 100644
--- a/ext/socket/unixsocket.c
+++ b/ext/socket/unixsocket.c
@@ -62,7 +62,7 @@ rsock_init_unixsock(VALUE sock, VALUE path, int server)
if (status < 0) {
close(fd);
- rb_sys_fail(sockaddr.sun_path);
+ rb_sys_fail_str(path);
}
if (server) {