X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/39236c6e673c41db228275375ab7fdb0f837b292..cc8bc92ae4a8e9f1a1ab61bf83d34ad8150b3405:/libkern/net/inet_ntop.c?ds=inline diff --git a/libkern/net/inet_ntop.c b/libkern/net/inet_ntop.c index 309d35bb9..d15bc57ff 100644 --- a/libkern/net/inet_ntop.c +++ b/libkern/net/inet_ntop.c @@ -118,10 +118,12 @@ inet_ntop6(const u_char *src, char *dst, socklen_t size) cur.len = 0; for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++) { if (words[i] == 0) { - if (cur.base == -1) - cur.base = i, cur.len = 1; - else + if (cur.base == -1) { + cur.base = i; + cur.len = 1; + } else { cur.len++; + } } else { if (cur.base != -1) { if (best.base == -1 || cur.len > best.len)