ifcfg-rh: socket() returns -1 on failure

This commit is contained in:
Jiří Klimeš
2011-06-15 10:43:07 +02:00
parent 5075ffe324
commit 17bc5867dc

View File

@@ -3246,7 +3246,7 @@ is_wireless_device (const char *iface)
g_return_val_if_fail (iface != NULL, FALSE);
fd = socket(AF_INET, SOCK_DGRAM, 0);
if (!fd)
if (fd == -1)
return FALSE;
memset (&wrq, 0, sizeof (struct iwreq));