Browse Source

network: use explicit bool conversions in GetAvailableNetworkInterfaces

Sönke Holz 5 năm trước cách đây
mục cha
commit
771de32af1
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/core/network/network_interface.cpp

+ 1 - 1
src/core/network/network_interface.cpp

@@ -92,7 +92,7 @@ std::vector<NetworkInterface> GetAvailableNetworkInterfaces() {
             continue;
         }
 
-        if (!(ifa->ifa_flags & IFF_UP) || ifa->ifa_flags & IFF_LOOPBACK) {
+        if ((ifa->ifa_flags & IFF_UP) == 0 || (ifa->ifa_flags & IFF_LOOPBACK) != 0) {
             continue;
         }