mirror of
https://github.com/reactos/reactos.git
synced 2024-09-10 04:42:00 +00:00
[IPHLPAPI][NETCFGX]
- Don't check arrays against NULL. CID 513720, 513721, 1322048, 1322049 svn path=/trunk/; revision=73771
This commit is contained in:
parent
ac044acb7d
commit
d4ede62fde
|
@ -2027,7 +2027,7 @@ DWORD WINAPI IpReleaseAddress(PIP_ADAPTER_INDEX_MAP AdapterInfo)
|
||||||
{
|
{
|
||||||
DWORD Status, Version = 0;
|
DWORD Status, Version = 0;
|
||||||
|
|
||||||
if (!AdapterInfo || !AdapterInfo->Name)
|
if (!AdapterInfo)
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
/* Maybe we should do this in DllMain */
|
/* Maybe we should do this in DllMain */
|
||||||
|
@ -2061,7 +2061,7 @@ DWORD WINAPI IpRenewAddress(PIP_ADAPTER_INDEX_MAP AdapterInfo)
|
||||||
{
|
{
|
||||||
DWORD Status, Version = 0;
|
DWORD Status, Version = 0;
|
||||||
|
|
||||||
if (!AdapterInfo || !AdapterInfo->Name)
|
if (!AdapterInfo)
|
||||||
return ERROR_INVALID_PARAMETER;
|
return ERROR_INVALID_PARAMETER;
|
||||||
|
|
||||||
/* Maybe we should do this in DllMain */
|
/* Maybe we should do this in DllMain */
|
||||||
|
|
|
@ -780,7 +780,6 @@ TcpipAdvGwDlg(
|
||||||
SendDlgItemMessageW(hwndDlg, IDC_OK, WM_SETTEXT, 0, (LPARAM)szBuffer);
|
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)
|
if (pGwSettings->Metric)
|
||||||
|
@ -941,10 +940,7 @@ TcpipAddIpDlg(
|
||||||
SendDlgItemMessageW(hwndDlg, IDC_OK, WM_SETTEXT, 0, (LPARAM)szBuffer);
|
SendDlgItemMessageW(hwndDlg, IDC_OK, WM_SETTEXT, 0, (LPARAM)szBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pIpSettings->szIP)
|
|
||||||
SendDlgItemMessageW(hwndDlg, IDC_IPADDR, IPM_SETADDRESS, 0, (LPARAM)GetIpAddressFromStringW(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_SUBNETMASK, IPM_SETADDRESS, 0, (LPARAM)GetIpAddressFromStringW(pIpSettings->szMask));
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in a new issue