Procházet zdrojové kódy

misc/get_iface_info.h: fix incorrect error check

ambrop7 před 13 roky
rodič
revize
8b1ad6e6c3
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      misc/get_iface_info.h

+ 1 - 1
misc/get_iface_info.h

@@ -60,7 +60,7 @@ static int badvpn_get_iface_info (const char *ifname, uint8_t *out_mac, int *out
     struct ifreq ifr;
     
     int s = socket(AF_INET, SOCK_DGRAM, 0);
-    if (!s) {
+    if (s < 0) {
         goto fail0;
     }