ZeroMemory(pIpNetTable, sizeof(*pIpNetTable));
- iRet = GetIpNetTable(pIpNetTable, &Size, TRUE);
-
- if (iRet != NO_ERROR)
+ if (GetIpNetTable(pIpNetTable, &Size, TRUE) != NO_ERROR)
{
_tprintf(_T("failed to allocate memory for GetIpNetTable\n"));
DoFormatMessage();
ZeroMemory(pIpAddrTable, sizeof(*pIpAddrTable));
- iRet = GetIpAddrTable(pIpAddrTable, &Size, TRUE);
-
- if (iRet != NO_ERROR)
+ if ((iRet = GetIpAddrTable(pIpAddrTable, &Size, TRUE)) != NO_ERROR)
{
_tprintf(_T("GetIpAddrTable failed: %d\n"), iRet);
DoFormatMessage();
PMIB_IPNETTABLE pIpNetTable = NULL;
DWORD dwIpAddr = 0;
ULONG Size = 0;
- INT iRet, i, val, c;
+ INT i, val, c;
/* error checking */
ZeroMemory(pIpNetTable, sizeof(*pIpNetTable));
- iRet = GetIpNetTable(pIpNetTable, &Size, TRUE);
-
- if (iRet != NO_ERROR)
+ if (GetIpNetTable(pIpNetTable, &Size, TRUE) != NO_ERROR)
{
_tprintf(_T("failed to allocate memory for GetIpNetTable\n"));
DoFormatMessage();
/* Add the ARP entry */
- if ((iRet = SetIpNetEntry(pAddHost)) != NO_ERROR)
+ if (SetIpNetEntry(pAddHost) != NO_ERROR)
{
DoFormatMessage();
goto cleanup;
PMIB_IPNETTABLE pIpNetTable = NULL;
ULONG Size = 0;
DWORD dwIpAddr = 0;
- INT iRet;
BOOL bFlushTable = FALSE;
/* error checking */
ZeroMemory(pIpNetTable, sizeof(*pIpNetTable));
- iRet = GetIpNetTable(pIpNetTable, &Size, TRUE);
-
- if (iRet != NO_ERROR)
+ if (GetIpNetTable(pIpNetTable, &Size, TRUE) != NO_ERROR)
{
_tprintf(_T("failed to allocate memory for GetIpNetTable\n"));
DoFormatMessage();
if (bFlushTable == TRUE)
{
/* delete arp cache */
- if ((iRet = FlushIpNetTable(pDelHost->dwIndex)) != NO_ERROR)
+ if (FlushIpNetTable(pDelHost->dwIndex) != NO_ERROR)
{
DoFormatMessage();
goto cleanup;
pDelHost->dwAddr = dwIpAddr;
/* Add the ARP entry */
- if ((iRet = DeleteIpNetEntry(pDelHost)) != NO_ERROR)
+ if (DeleteIpNetEntry(pDelHost) != NO_ERROR)
{
DoFormatMessage();
goto cleanup;