ObjFW  Diff

Differences From Artifact [0280b236b8]:

To Artifact [40c5efdd20]:


232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
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;
	size_t i;
#endif

	hash += address->address.ss_family;

	switch (address->address.ss_family) {
	case AF_INET:
#ifndef OF_WII







<







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
271
272
273
274
275
276
277
278

		sin6 = (struct sockaddr_in6*)&address->address;

		hash += (sin6->sin6_port << 1);

		OF_HASH_INIT(subhash);

		for (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;







|







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;