getifaddrs: one less indent level

This commit is contained in:
rofl0r 2013-04-05 22:08:03 +02:00
parent c82f53f67c
commit 69a1983872

View File

@ -137,7 +137,6 @@ int getifaddrs(struct ifaddrs **ifap)
struct ifreq reqs[32]; /* arbitrary chosen boundary */
struct ifconf conf = {.ifc_len = sizeof reqs, .ifc_req = reqs};
if(-1 == ioctl(sock, SIOCGIFCONF, &conf)) goto err;
else {
size_t reqitems = conf.ifc_len / sizeof(struct ifreq);
for(head = list; head; head = (stor*)head->next) {
size_t i;
@ -171,7 +170,6 @@ int getifaddrs(struct ifaddrs **ifap)
head->ifa.ifa_ifu.ifu_dstaddr = (struct sockaddr*) &head->dst;
}
}
}
close(sock);
void* last = 0;
for(head = list; head; head=(stor*)head->next) last=head;