mirror of
https://github.com/fluencelabs/musl
synced 2025-05-29 23:51:34 +00:00
getifaddrs: one less indent level
This commit is contained in:
parent
c82f53f67c
commit
69a1983872
@ -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…
x
Reference in New Issue
Block a user