https://git.reactos.org/?p=reactos.git;a=commitdiff;h=02680ace4dcc6d75b6790…
commit 02680ace4dcc6d75b67904727fcca83bd81b1ebf
Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr>
AuthorDate: Mon Jun 1 21:29:02 2020 +0200
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sat Jun 27 14:43:08 2020 +0200
[POWRPROF_APITEST] Fix cppcheck warnings.
* test_CallNtPowerInformation(): Fix 2 'sizeof(sizeof())' copypastas
* test_ValidatePowerPolicies_Next(): Delete a duplicate line
---
modules/rostests/apitests/powrprof/power.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/modules/rostests/apitests/powrprof/power.c
b/modules/rostests/apitests/powrprof/power.c
index d95b8d108e4..d09b99b8a19 100644
--- a/modules/rostests/apitests/powrprof/power.c
+++ b/modules/rostests/apitests/powrprof/power.c
@@ -60,7 +60,7 @@ void test_CallNtPowerInformation(void)
/* LastSleepTime tests */
retval = CallNtPowerInformation(LastSleepTime, 0, 0, 0, 0);
ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but
got %d\n", (UINT)retval);
- retval = CallNtPowerInformation(LastSleepTime, &atime, sizeof(sizeof(ULONGLONG)),
0, 0);
+ retval = CallNtPowerInformation(LastSleepTime, &atime, sizeof(ULONGLONG), 0, 0);
ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected
STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval);
retval = CallNtPowerInformation(LastSleepTime, &atime, sizeof(ULONGLONG),
&ctime, sizeof(ULONGLONG));
ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected
STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval);
@@ -70,7 +70,7 @@ void test_CallNtPowerInformation(void)
/* LastWakeTime tests */
retval = CallNtPowerInformation(LastWakeTime, 0, 0, 0, 0);
ok(retval == STATUS_SUCCESS, "function result wrong expected STATUS_SUCCESS but
got %d\n", (UINT)retval);
- retval = CallNtPowerInformation(LastWakeTime, &atime, sizeof(sizeof(ULONGLONG)),
0, 0);
+ retval = CallNtPowerInformation(LastWakeTime, &atime, sizeof(ULONGLONG), 0, 0);
ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected
STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval);
retval = CallNtPowerInformation(LastWakeTime, &atime, sizeof(ULONGLONG),
&ctime, sizeof(ULONGLONG));
ok(retval == STATUS_INVALID_PARAMETER, "function result wrong expected
STATUS_INVALID_PARAMETER but got %d\n", (UINT)retval);
@@ -4621,7 +4621,6 @@ pPP_original->user.OptimizeForPowerDc=1;
ok(ret, "function was expected to succeed error
%i\n",(UINT)GetLastError());
ok(globalcompare(gpp,gpp_compare),"Difference Found\n");
pp_compare.user.MaxSleepAc=4;
- pp_compare.user.MaxSleepAc=4;
ok(compare(pp,pp_compare),"Difference Found\n");
pPP_original->user.MaxSleepAc=PowerSystemShutdown;