ext/kgio/connect.c in kgio-2.0.0 vs ext/kgio/connect.c in kgio-2.1.0
- old
+ new
@@ -117,10 +117,10 @@
struct sockaddr_un addr = { 0 };
long len;
StringValue(path);
len = RSTRING_LEN(path);
- if (sizeof(addr.sun_path) <= len)
+ if ((long)sizeof(addr.sun_path) <= len)
rb_raise(rb_eArgError,
"too long unix socket path (max: %dbytes)",
(int)sizeof(addr.sun_path)-1);
memcpy(addr.sun_path, RSTRING_PTR(path), len);