From b260dcdb8180ce1960f03220f2e1a5da960e89de Mon Sep 17 00:00:00 2001 From: Ged Murphy Date: Fri, 11 Nov 2005 18:09:46 +0000 Subject: [PATCH] don't try and display data if iphlpapi functions fail svn path=/trunk/; revision=19134 --- reactos/apps/utils/net/ipconfig/ipconfig.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/reactos/apps/utils/net/ipconfig/ipconfig.c b/reactos/apps/utils/net/ipconfig/ipconfig.c index 6025428dafe..ef82c22df14 100644 --- a/reactos/apps/utils/net/ipconfig/ipconfig.c +++ b/reactos/apps/utils/net/ipconfig/ipconfig.c @@ -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;