1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/socket/getaddrinfo.c: parenthesize macro arguments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2011-03-26 06:16:42 +00:00
parent 5f969a9d17
commit c65953cd03
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
Sat Mar 26 15:16:09 2011 Tanaka Akira <akr@fsij.org>
* ext/socket/getaddrinfo.c: parenthesize macro arguments.
Sat Mar 26 05:27:34 2011 NARUSE, Yui <naruse@ruby-lang.org>
* ext/date/lib/date/format.rb (DateTime#strftime): removed because

View file

@ -182,12 +182,12 @@ if (pai->ai_flags & AI_CANONNAME) {\
error = EAI_MEMORY;\
goto free;\
}\
memcpy(ai, pai, sizeof(struct addrinfo));\
memcpy((ai), pai, sizeof(struct addrinfo));\
(ai)->ai_addr = (struct sockaddr *)((ai) + 1);\
memset((ai)->ai_addr, 0, (afd)->a_socklen);\
SET_SA_LEN((ai)->ai_addr, (ai)->ai_addrlen = (afd)->a_socklen);\
(ai)->ai_addr->sa_family = (ai)->ai_family = (afd)->a_af;\
((struct sockinet *)(ai)->ai_addr)->si_port = port;\
((struct sockinet *)(ai)->ai_addr)->si_port = (port);\
p = (char *)((ai)->ai_addr);\
memcpy(p + (afd)->a_off, (addr), (afd)->a_addrlen);\
}