summaryrefslogtreecommitdiffstats
path: root/src/network/kernel/qnetworkinterface_win.cpp
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@collabora.com>2011-12-20 21:39:12 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-06 14:11:14 +0100
commitb08daaedd45457b775cb90d2c2650510daff1c8d (patch)
treed68ea8016a15ee851813133a51897a7a81aedc16 /src/network/kernel/qnetworkinterface_win.cpp
parent514ef34d1f838be119961003c0411a88352ba535 (diff)
Remove all non-inline of qMalloc/qFree/qRealloc.
We're trying to deprecate these, so don't use them anymore. The inline uses of these have been left intact, for the moment. Inline code will need to create their own non-inline allocation methods (for future-proofing to allow alterations in how e.g. individual containers allocate) Change-Id: I1071a487c25e95b7bb81a3327b20c5481fb5ed22 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Diffstat (limited to 'src/network/kernel/qnetworkinterface_win.cpp')
-rw-r--r--src/network/kernel/qnetworkinterface_win.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/network/kernel/qnetworkinterface_win.cpp b/src/network/kernel/qnetworkinterface_win.cpp
index 741e8e73ae..da9fa80efc 100644
--- a/src/network/kernel/qnetworkinterface_win.cpp
+++ b/src/network/kernel/qnetworkinterface_win.cpp
@@ -110,12 +110,12 @@ static QHash<QHostAddress, QHostAddress> ipv4Netmasks()
DWORD retval = ptrGetAdaptersInfo(pAdapter, &bufSize);
if (retval == ERROR_BUFFER_OVERFLOW) {
// need more memory
- pAdapter = (IP_ADAPTER_INFO *)qMalloc(bufSize);
+ pAdapter = (IP_ADAPTER_INFO *)malloc(bufSize);
if (!pAdapter)
return ipv4netmasks;
// try again
if (ptrGetAdaptersInfo(pAdapter, &bufSize) != ERROR_SUCCESS) {
- qFree(pAdapter);
+ free(pAdapter);
return ipv4netmasks;
}
} else if (retval != ERROR_SUCCESS) {
@@ -132,7 +132,7 @@ static QHash<QHostAddress, QHostAddress> ipv4Netmasks()
}
}
if (pAdapter != staticBuf)
- qFree(pAdapter);
+ free(pAdapter);
return ipv4netmasks;
@@ -153,12 +153,12 @@ static QList<QNetworkInterfacePrivate *> interfaceListingWinXP()
ULONG retval = ptrGetAdaptersAddresses(AF_UNSPEC, flags, NULL, pAdapter, &bufSize);
if (retval == ERROR_BUFFER_OVERFLOW) {
// need more memory
- pAdapter = (IP_ADAPTER_ADDRESSES *)qMalloc(bufSize);
+ pAdapter = (IP_ADAPTER_ADDRESSES *)malloc(bufSize);
if (!pAdapter)
return interfaces;
// try again
if (ptrGetAdaptersAddresses(AF_UNSPEC, flags, NULL, pAdapter, &bufSize) != ERROR_SUCCESS) {
- qFree(pAdapter);
+ free(pAdapter);
return interfaces;
}
} else if (retval != ERROR_SUCCESS) {
@@ -219,7 +219,7 @@ static QList<QNetworkInterfacePrivate *> interfaceListingWinXP()
}
if (pAdapter != staticBuf)
- qFree(pAdapter);
+ free(pAdapter);
return interfaces;
}
@@ -234,12 +234,12 @@ static QList<QNetworkInterfacePrivate *> interfaceListingWin2k()
DWORD retval = ptrGetAdaptersInfo(pAdapter, &bufSize);
if (retval == ERROR_BUFFER_OVERFLOW) {
// need more memory
- pAdapter = (IP_ADAPTER_INFO *)qMalloc(bufSize);
+ pAdapter = (IP_ADAPTER_INFO *)malloc(bufSize);
if (!pAdapter)
return interfaces;
// try again
if (ptrGetAdaptersInfo(pAdapter, &bufSize) != ERROR_SUCCESS) {
- qFree(pAdapter);
+ free(pAdapter);
return interfaces;
}
} else if (retval != ERROR_SUCCESS) {
@@ -273,7 +273,7 @@ static QList<QNetworkInterfacePrivate *> interfaceListingWin2k()
}
if (pAdapter != staticBuf)
- qFree(pAdapter);
+ free(pAdapter);
return interfaces;
}
@@ -305,12 +305,12 @@ QString QHostInfo::localDomainName()
ULONG bufSize = sizeof info;
pinfo = &info;
if (ptrGetNetworkParams(pinfo, &bufSize) == ERROR_BUFFER_OVERFLOW) {
- pinfo = (FIXED_INFO *)qMalloc(bufSize);
+ pinfo = (FIXED_INFO *)malloc(bufSize);
if (!pinfo)
return QString();
// try again
if (ptrGetNetworkParams(pinfo, &bufSize) != ERROR_SUCCESS) {
- qFree(pinfo);
+ free(pinfo);
return QString(); // error
}
}
@@ -318,7 +318,7 @@ QString QHostInfo::localDomainName()
QString domainName = QUrl::fromAce(pinfo->DomainName);
if (pinfo != &info)
- qFree(pinfo);
+ free(pinfo);
return domainName;
}