don't try and display data if iphlpapi functions fail
authorGed Murphy <gedmurphy@reactos.org>
Fri, 11 Nov 2005 18:09:46 +0000 (18:09 +0000)
committerGed Murphy <gedmurphy@reactos.org>
Fri, 11 Nov 2005 18:09:46 +0000 (18:09 +0000)
svn path=/trunk/; revision=19134

reactos/apps/utils/net/ipconfig/ipconfig.c

index 6025428..ef82c22 100644 (file)
@@ -127,9 +127,16 @@ INT ShowInfo(BOOL bAll)
     }
 
     if (! GetAdaptersInfo(pAdapterInfo, &adaptOutBufLen) == NO_ERROR)
-        _tprintf(_T("GetAdaptersInfo failed %lu\n"), GetLastError());
+       {
+               _tprintf(_T("GetAdaptersInfo failed %lu\n"), GetLastError());
+               return EXIT_FAILURE;
+       }
+
     if (! GetNetworkParams(pFixedInfo, &netOutBufLen) == NO_ERROR)
+       {
         _tprintf(_T("GetNetworkParams failed %lu\n"), GetLastError());
+               return EXIT_FAILURE;
+       }
     
     pAdapter = pAdapterInfo;
         //HKEY hKey;