diff options
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/net/getaddrinfo.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index cd85282..a2552a9 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -1835,15 +1835,15 @@ addr4sort(struct addrinfo *sentinel, res_state res) } while (needsort < naddrs) { - for (j = needsort - 1; j >= 0; j--) { - if (addrs[j].aval > addrs[j+1].aval) { - addr = addrs[j]; - addrs[j] = addrs[j + 1]; - addrs[j + 1] = addr; - } else - break; - } - needsort++; + for (j = needsort - 1; j >= 0; j--) { + if (addrs[j].aval > addrs[j+1].aval) { + addr = addrs[j]; + addrs[j] = addrs[j + 1]; + addrs[j + 1] = addr; + } else + break; + } + needsort++; } ai = sentinel; |