Remove unused socket from QNetworkInterface Unix code
This must be a relic from old code, before I split out the code that uses getifaddrs from the code that doesn't. Change-Id: Ia1265da6921c7c7a3dc97315d98fed50b3d2fe1c Reviewed-by: Richard J. Moore <rich@kde.org> Reviewed-by: Peter Hartmann <phartmann@blackberry.com> Reviewed-by: Jonas Gastal <gastal@intel.com>
This commit is contained in:
parent
521f2163b1
commit
7a3653887c
@ -410,14 +410,9 @@ static QList<QNetworkInterfacePrivate *> interfaceListing()
|
|||||||
{
|
{
|
||||||
QList<QNetworkInterfacePrivate *> interfaces;
|
QList<QNetworkInterfacePrivate *> interfaces;
|
||||||
|
|
||||||
int socket;
|
|
||||||
if ((socket = qt_safe_socket(AF_INET, SOCK_STREAM, IPPROTO_IP)) == -1)
|
|
||||||
return interfaces; // error
|
|
||||||
|
|
||||||
ifaddrs *interfaceListing;
|
ifaddrs *interfaceListing;
|
||||||
if (getifaddrs(&interfaceListing) == -1) {
|
if (getifaddrs(&interfaceListing) == -1) {
|
||||||
// error
|
// error
|
||||||
::close(socket);
|
|
||||||
return interfaces;
|
return interfaces;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -452,7 +447,6 @@ static QList<QNetworkInterfacePrivate *> interfaceListing()
|
|||||||
}
|
}
|
||||||
|
|
||||||
freeifaddrs(interfaceListing);
|
freeifaddrs(interfaceListing);
|
||||||
::close(socket);
|
|
||||||
return interfaces;
|
return interfaces;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user