aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/wifi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/components/wifi.c b/components/wifi.c
index 23af201..8b33baa 100644
--- a/components/wifi.c
+++ b/components/wifi.c
@@ -110,10 +110,10 @@
}
if (strcmp(ifr.ifr_name, interface) != 0) {
strcpy(ifr.ifr_name, interface);
- if (ioctl(ifsock, SIOCGIFINDEX, &ifr) != 0) {
- warn("ioctl 'SIOCGIFINDEX':");
- return -1;
- }
+ }
+ if (ioctl(ifsock, SIOCGIFINDEX, &ifr) != 0) {
+ warn("ioctl 'SIOCGIFINDEX':");
+ return -1;
}
return ifr.ifr_ifindex;
}