Author: tfaber
Date: Sat Feb 11 10:54:09 2017
New Revision: 73771
URL:
http://svn.reactos.org/svn/reactos?rev=73771&view=rev
Log:
[IPHLPAPI][NETCFGX]
- Don't check arrays against NULL. CID 513720, 513721, 1322048, 1322049
Modified:
trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c
trunk/reactos/dll/win32/netcfgx/tcpipconf_notify.c
Modified: trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/iphlpapi/iphlpap…
==============================================================================
--- trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/iphlpapi/iphlpapi_main.c [iso-8859-1] Sat Feb 11 10:54:09
2017
@@ -2027,7 +2027,7 @@
{
DWORD Status, Version = 0;
- if (!AdapterInfo || !AdapterInfo->Name)
+ if (!AdapterInfo)
return ERROR_INVALID_PARAMETER;
/* Maybe we should do this in DllMain */
@@ -2061,7 +2061,7 @@
{
DWORD Status, Version = 0;
- if (!AdapterInfo || !AdapterInfo->Name)
+ if (!AdapterInfo)
return ERROR_INVALID_PARAMETER;
/* Maybe we should do this in DllMain */
Modified: trunk/reactos/dll/win32/netcfgx/tcpipconf_notify.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netcfgx/tcpipcon…
==============================================================================
--- trunk/reactos/dll/win32/netcfgx/tcpipconf_notify.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/netcfgx/tcpipconf_notify.c [iso-8859-1] Sat Feb 11 10:54:09
2017
@@ -780,8 +780,7 @@
SendDlgItemMessageW(hwndDlg, IDC_OK, WM_SETTEXT, 0,
(LPARAM)szBuffer);
}
- if (pGwSettings->szIP)
- SendDlgItemMessageW(hwndDlg, IDC_IPADDR, IPM_SETADDRESS, 0,
(LPARAM)GetIpAddressFromStringW(pGwSettings->szIP));
+ SendDlgItemMessageW(hwndDlg, IDC_IPADDR, IPM_SETADDRESS, 0,
(LPARAM)GetIpAddressFromStringW(pGwSettings->szIP));
if (pGwSettings->Metric)
{
@@ -941,11 +940,8 @@
SendDlgItemMessageW(hwndDlg, IDC_OK, WM_SETTEXT, 0,
(LPARAM)szBuffer);
}
- if (pIpSettings->szIP)
- SendDlgItemMessageW(hwndDlg, IDC_IPADDR, IPM_SETADDRESS, 0,
(LPARAM)GetIpAddressFromStringW(pIpSettings->szIP));
-
- if (pIpSettings->szMask)
- SendDlgItemMessageW(hwndDlg, IDC_SUBNETMASK, IPM_SETADDRESS, 0,
(LPARAM)GetIpAddressFromStringW(pIpSettings->szMask));
+ SendDlgItemMessageW(hwndDlg, IDC_IPADDR, IPM_SETADDRESS, 0,
(LPARAM)GetIpAddressFromStringW(pIpSettings->szIP));
+ SendDlgItemMessageW(hwndDlg, IDC_SUBNETMASK, IPM_SETADDRESS, 0,
(LPARAM)GetIpAddressFromStringW(pIpSettings->szMask));
}
return TRUE;
case WM_NOTIFY: