Alexandre Julliard : ntdll/tests: Avoid printing pointer differences in traces.
Alexandre Julliard
julliard at winehq.org
Thu Jan 8 08:30:54 CST 2009
Module: wine
Branch: master
Commit: 6500bb0e50b00c70afa7e37904fcc9ea00248827
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6500bb0e50b00c70afa7e37904fcc9ea00248827
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Jan 8 13:02:23 2009 +0100
ntdll/tests: Avoid printing pointer differences in traces.
---
dlls/ntdll/tests/env.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/tests/env.c b/dlls/ntdll/tests/env.c
index 92f654e..8289841 100644
--- a/dlls/ntdll/tests/env.c
+++ b/dlls/ntdll/tests/env.c
@@ -86,11 +86,12 @@ static void testQuery(void)
WCHAR bv[257];
UNICODE_STRING name;
UNICODE_STRING value;
- const struct test* test;
NTSTATUS nts;
+ unsigned int i;
- for (test = tests; test->var; test++)
+ for (i = 0; tests[i].var; i++)
{
+ const struct test *test = &tests[i];
name.Length = strlen(test->var) * 2;
name.MaximumLength = name.Length + 2;
name.Buffer = bn;
@@ -103,7 +104,7 @@ static void testQuery(void)
nts = pRtlQueryEnvironmentVariable_U(small_env, &name, &value);
ok( nts == test->status || (test->alt && nts == test->alt),
"[%d]: Wrong status for '%s', expecting %x got %x\n",
- test - tests, test->var, test->status, nts );
+ i, test->var, test->status, nts );
if (nts == test->status) switch (nts)
{
case STATUS_SUCCESS:
More information about the wine-cvs
mailing list