Explorar el Código

misc/get_iface_info.h: fix incorrect error check

ambrop7 hace 13 años
padre
commit
8b1ad6e6c3
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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;
     }