Make minor improvements

This commit is contained in:
Justine Tunney 2021-05-15 21:53:26 -07:00
parent 221817e537
commit 4864565198
41 changed files with 394 additions and 367 deletions

View file

@ -22,13 +22,13 @@
/**
* Frees addresses returned by getaddrinfo().
*/
int freeaddrinfo(struct addrinfo *addrs) {
int freeaddrinfo(struct addrinfo *ai) {
struct addrinfo *next;
while (addrs) {
while (ai) {
/* we assume ai_addr and ai_canonname are shoehorned */
next = addrs->ai_next;
free(addrs);
addrs = next;
next = ai->ai_next;
free(ai);
ai = next;
}
return 0;
}