]> git.saurik.com Git - apple/xnu.git/blobdiff - libkern/net/inet_ntop.c
xnu-4570.20.62.tar.gz
[apple/xnu.git] / libkern / net / inet_ntop.c
index 309d35bb940751c577bd90701a234061249e8a38..d15bc57ffb15c9477b7405639432355ca0eb0f24 100644 (file)
@@ -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)