diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-02 12:13:00 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-02 12:13:00 +0000 |
commit | a36ea435d26b97d2ca185e315106c856e5d2c9de (patch) | |
tree | 16486b814bf26d707e41128ee3c9dd23924b74bc /ext/socket | |
parent | 344dcc25be6741e58e80b3dbf10f7d702bd080cc (diff) | |
download | ruby-a36ea435d26b97d2ca185e315106c856e5d2c9de.tar.gz |
forgot to commit.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r-- | ext/socket/raddrinfo.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c index 9b9aabf7f1..21cc953e1f 100644 --- a/ext/socket/raddrinfo.c +++ b/ext/socket/raddrinfo.c @@ -1255,16 +1255,16 @@ addrinfo_mload(VALUE self, VALUE ary) #ifdef HAVE_SYS_UN_H case AF_UNIX: { - struct sockaddr_un sun; - memset(&sun, 0, sizeof(sun)); - sun.sun_family = AF_UNIX; + struct sockaddr_un uaddr; + memset(&uaddr, 0, sizeof(uaddr)); + uaddr.sun_family = AF_UNIX; StringValue(v); - if (sizeof(sun.sun_path) <= (size_t)RSTRING_LEN(v)) + if (sizeof(uaddr.sun_path) <= (size_t)RSTRING_LEN(v)) rb_raise(rb_eSocket, "too long AF_UNIX path"); - memcpy(sun.sun_path, RSTRING_PTR(v), RSTRING_LEN(v)); - len = sizeof(sun); - memcpy(&ss, &sun, len); + memcpy(uaddr.sun_path, RSTRING_PTR(v), RSTRING_LEN(v)); + len = sizeof(uaddr); + memcpy(&ss, &uaddr, len); break; } #endif |