ifcfg-rh: socket() returns -1 on failure
This commit is contained in:
@@ -3246,7 +3246,7 @@ is_wireless_device (const char *iface)
|
|||||||
g_return_val_if_fail (iface != NULL, FALSE);
|
g_return_val_if_fail (iface != NULL, FALSE);
|
||||||
|
|
||||||
fd = socket(AF_INET, SOCK_DGRAM, 0);
|
fd = socket(AF_INET, SOCK_DGRAM, 0);
|
||||||
if (!fd)
|
if (fd == -1)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
memset (&wrq, 0, sizeof (struct iwreq));
|
memset (&wrq, 0, sizeof (struct iwreq));
|
||||||
|
Reference in New Issue
Block a user