mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-10-05 22:29:49 +00:00
minor: fixed coding style in ip6addr_aton()
This commit is contained in:
parent
45fd622491
commit
5a185a0fbd
@ -79,10 +79,11 @@ ip6addr_aton(const char *cp, ip6_addr_t *addr)
|
|||||||
zero_blocks may be 1 even if there are no :: sequences */
|
zero_blocks may be 1 even if there are no :: sequences */
|
||||||
zero_blocks = 8;
|
zero_blocks = 8;
|
||||||
for (s = cp; *s != 0; s++) {
|
for (s = cp; *s != 0; s++) {
|
||||||
if (*s == ':')
|
if (*s == ':') {
|
||||||
zero_blocks--;
|
zero_blocks--;
|
||||||
else if (!isxdigit(*s))
|
} else if (!isxdigit(*s)) {
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* parse each block */
|
/* parse each block */
|
||||||
@ -112,8 +113,7 @@ ip6addr_aton(const char *cp, ip6_addr_t *addr)
|
|||||||
zero_blocks--;
|
zero_blocks--;
|
||||||
if (current_block_index & 0x1) {
|
if (current_block_index & 0x1) {
|
||||||
addr_index++;
|
addr_index++;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (addr) {
|
if (addr) {
|
||||||
addr->addr[addr_index] = 0;
|
addr->addr[addr_index] = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user