From 94aaa3b4d56ab2606f8fc074ac8a7ac94c1808a3 Mon Sep 17 00:00:00 2001 From: Rafal Harabien Date: Mon, 2 May 2011 16:45:41 +0000 Subject: [PATCH] [TASKMGR] * Don't compare NTSTATUS to NO_ERROR. Use NT_SUCCESS macro instead. Spotted by dmex. svn path=/trunk/; revision=51556 --- reactos/base/applications/taskmgr/perfdata.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/reactos/base/applications/taskmgr/perfdata.c b/reactos/base/applications/taskmgr/perfdata.c index a82eb78ef1e..50132d0b2b2 100644 --- a/reactos/base/applications/taskmgr/perfdata.c +++ b/reactos/base/applications/taskmgr/perfdata.c @@ -60,7 +60,7 @@ BOOL PerfDataInitialize(void) * Get number of processors in the system */ status = NtQuerySystemInformation(SystemBasicInformation, &SystemBasicInfo, sizeof(SystemBasicInfo), NULL); - if (status != NO_ERROR) + if (!NT_SUCCESS(status)) return FALSE; /* @@ -180,24 +180,24 @@ void PerfDataRefresh(void) /* Get new system time */ status = NtQuerySystemInformation(SystemTimeOfDayInformation, &SysTimeInfo, sizeof(SysTimeInfo), 0); - if (status != NO_ERROR) + if (!NT_SUCCESS(status)) return; /* Get new CPU's idle time */ status = NtQuerySystemInformation(SystemPerformanceInformation, &SysPerfInfo, sizeof(SysPerfInfo), NULL); - if (status != NO_ERROR) + if (!NT_SUCCESS(status)) return; /* Get system cache information */ status = NtQuerySystemInformation(SystemFileCacheInformation, &SysCacheInfo, sizeof(SysCacheInfo), NULL); - if (status != NO_ERROR) + if (!NT_SUCCESS(status)) return; /* Get processor time information */ SysProcessorTimeInfo = (PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION)HeapAlloc(GetProcessHeap(), 0, sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) * SystemBasicInfo.NumberOfProcessors); status = NtQuerySystemInformation(SystemProcessorPerformanceInformation, SysProcessorTimeInfo, sizeof(SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION) * SystemBasicInfo.NumberOfProcessors, &ulSize); - if (status != NO_ERROR) + if (!NT_SUCCESS(status)) { if (SysProcessorTimeInfo != NULL) HeapFree(GetProcessHeap(), 0, SysProcessorTimeInfo);