fix(network): no need to check family here

This commit is contained in:
Alex 2019-06-25 07:55:55 +02:00
parent 9c8e39c30c
commit c916fe258e
1 changed files with 1 additions and 2 deletions

View File

@ -546,8 +546,7 @@ int waybar::modules::Network::getPreferredIface(int skip_idx) const {
ifa = ifaddr;
ifid = -1;
while (ifa != nullptr) {
if (ifa->ifa_addr->sa_family == family_ &&
wildcardMatch(config_["interface"].asString(), ifa->ifa_name)) {
if (wildcardMatch(config_["interface"].asString(), ifa->ifa_name)) {
ifid = if_nametoindex(ifa->ifa_name);
break;
}