Make proper use of IN6_ARE_ADDR_EQUAL()

Pass pointers to sin6_addr instead of passing sin6_addr.s6_addr32 which
isn't portable and isn't the proper way to use the macro anyway.
This commit is contained in:
Julien BLACHE 2011-02-24 19:51:37 +01:00
parent 1a11efec58
commit 13e2b12f9e

View File

@ -1952,7 +1952,7 @@ raop_v2_timing_cb(int fd, short what, void *arg)
for (rs = sessions; rs; rs = rs->next) for (rs = sessions; rs; rs = rs->next)
{ {
if ((rs->sa.ss.ss_family == AF_INET6) if ((rs->sa.ss.ss_family == AF_INET6)
&& IN6_ARE_ADDR_EQUAL(sa.sin6.sin6_addr.s6_addr32, rs->sa.sin6.sin6_addr.s6_addr32)) && IN6_ARE_ADDR_EQUAL(&sa.sin6.sin6_addr, &rs->sa.sin6.sin6_addr))
break; break;
} }
@ -2314,7 +2314,7 @@ raop_v2_control_cb(int fd, short what, void *arg)
for (rs = sessions; rs; rs = rs->next) for (rs = sessions; rs; rs = rs->next)
{ {
if ((rs->sa.ss.ss_family == AF_INET6) if ((rs->sa.ss.ss_family == AF_INET6)
&& IN6_ARE_ADDR_EQUAL(sa.sin6.sin6_addr.s6_addr32, rs->sa.sin6.sin6_addr.s6_addr32)) && IN6_ARE_ADDR_EQUAL(&sa.sin6.sin6_addr, &rs->sa.sin6.sin6_addr))
break; break;
} }