Differences From Artifact [0280b236b8]:
- File
src/OFUDPSocket.m
— part of check-in
[2a27cf3000]
at
2016-01-03 00:41:26
on branch trunk
— Update copyright
While at it, also update the mail address. (user: js, size: 13800) [annotate] [blame] [check-ins using]
To Artifact [40c5efdd20]:
- File src/OFUDPSocket.m — part of check-in [e0b9167693] at 2016-02-21 15:37:42 on branch trunk — Make use of C99-style for loops (user: js, size: 13796) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
232 233 234 235 236 237 238 | of_udp_socket_address_hash(of_udp_socket_address_t *address) { uint32_t hash = of_hash_seed; struct sockaddr_in *sin; #ifdef AF_INET6 struct sockaddr_in6 *sin6; uint32_t subhash; | < | 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | of_udp_socket_address_hash(of_udp_socket_address_t *address) { uint32_t hash = of_hash_seed; struct sockaddr_in *sin; #ifdef AF_INET6 struct sockaddr_in6 *sin6; uint32_t subhash; #endif hash += address->address.ss_family; switch (address->address.ss_family) { case AF_INET: #ifndef OF_WII |
︙ | ︙ | |||
264 265 266 267 268 269 270 | sin6 = (struct sockaddr_in6*)&address->address; hash += (sin6->sin6_port << 1); OF_HASH_INIT(subhash); | | | 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | sin6 = (struct sockaddr_in6*)&address->address; hash += (sin6->sin6_port << 1); OF_HASH_INIT(subhash); for (size_t i = 0; i < sizeof(sin6->sin6_addr.s6_addr); i++) OF_HASH_ADD(subhash, sin6->sin6_addr.s6_addr[i]); OF_HASH_FINALIZE(subhash); hash ^= subhash; break; |
︙ | ︙ |