summaryrefslogtreecommitdiff
path: root/ext/socket/raddrinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/raddrinfo.c')
-rw-r--r--ext/socket/raddrinfo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c
index 9212fc2..bd4af34 100644
--- a/ext/socket/raddrinfo.c
+++ b/ext/socket/raddrinfo.c
@@ -768,8 +768,8 @@ init_unix_addrinfo(rb_addrinfo_t *rai, VALUE path, int socktype)
StringValue(path);
if (sizeof(un.sun_path) <= (size_t)RSTRING_LEN(path))
- rb_raise(rb_eArgError, "too long unix socket path (max: %dbytes)",
- (int)sizeof(un.sun_path)-1);
+ rb_raise(rb_eArgError, "too long unix socket path (%ldbytes given but %dbytes max)",
+ RSTRING_LEN(path), (int)sizeof(un.sun_path)-1);
MEMZERO(&un, struct sockaddr_un, 1);