Browse Source

getifaddrs: one less indent level

rs-1.0
rofl0r 13 years ago
parent
commit
69a1983872
  1. 2
      src/network/getifaddrs.c

2
src/network/getifaddrs.c

@ -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;

Loading…
Cancel
Save