ruby-changes:17254
From: nobu <ko1@a...>
Date: Wed, 15 Sep 2010 08:26:12 +0900 (JST)
Subject: [ruby-changes:17254] Ruby:r29255 (trunk): * ext/socket/raddrinfo.c (ruby_getaddrinfo__darwin): suppress a
nobu 2010-09-15 08:26:03 +0900 (Wed, 15 Sep 2010) New Revision: 29255 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=29255 Log: * ext/socket/raddrinfo.c (ruby_getaddrinfo__darwin): suppress a warning. Modified files: trunk/ext/socket/raddrinfo.c Index: ext/socket/raddrinfo.c =================================================================== --- ext/socket/raddrinfo.c (revision 29254) +++ ext/socket/raddrinfo.c (revision 29255) @@ -102,11 +102,13 @@ #if defined(__APPLE__) static int ruby_getaddrinfo__darwin(const char *nodename, const char *servname, - struct addrinfo *hints, struct addrinfo **res) + const struct addrinfo *hints, struct addrinfo **res) { /* fix [ruby-core:29427] */ const char *tmp_servname; struct addrinfo tmp_hints; + int error; + tmp_servname = servname; MEMCPY(&tmp_hints, hints, struct addrinfo, 1); if (nodename && servname) { @@ -117,10 +119,9 @@ #endif } } - int error = getaddrinfo(nodename, tmp_servname, &tmp_hints, res); - if (error == 0) - { + error = getaddrinfo(nodename, tmp_servname, &tmp_hints, res); + if (error == 0) { /* [ruby-dev:23164] */ struct addrinfo *r; r = *res; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/