Differences From Artifact [62a31a2fc1]:
- File
src/socket.m
— part of check-in
[75d2d3ba01]
at
2018-08-11 14:29:25
on branch trunk
— OFDNSResourceRecord: Use of_socket_address_t
This avoids unnecessary string construction and parsing and removes
duplicate code to convert an address into a string. (user: js, size: 14194) [annotate] [blame] [check-ins using]
To Artifact [83494e19e7]:
- File src/socket.m — part of check-in [9a494f183b] at 2018-08-11 21:53:19 on branch trunk — Fix build on 3DS and Wii (user: js, size: 14192) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
533 534 535 536 537 538 539 | } if (zerosCount > maxZerosCount) { maxZerosStart = zerosStart; maxZerosCount = zerosCount; } if (maxZerosCount >= 2) { | | | | 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 | } if (zerosCount > maxZerosCount) { maxZerosStart = zerosStart; maxZerosCount = zerosCount; } if (maxZerosCount >= 2) { for (int_fast8_t i = 0; i < maxZerosStart; i += 2) { [string appendFormat: (first ? @"%x" : @":%x"), (addrIn6->sin6_addr.s6_addr[i] << 8) | addrIn6->sin6_addr.s6_addr[i + 1]]; first = false; } [string appendString: @"::"]; first = true; for (int_fast8_t i = maxZerosStart + (maxZerosCount * 2); i < 16; i += 2) { [string appendFormat: (first ? @"%x" : @":%x"), (addrIn6->sin6_addr.s6_addr[i] << 8) | addrIn6->sin6_addr.s6_addr[i + 1]]; first = false; } |
︙ | ︙ |