=?UTF-8?Q?Fr=C3=A9d=C3=A9ric=20Delanoy=20?=: ntdll/tests: Use BOOL type where appropriate.

Alexandre Julliard julliard at winehq.org
Tue Oct 29 15:12:25 CDT 2013


Module: wine
Branch: master
Commit: 81b181fe72b3d605b74a781294f69fa1de7c9cc9
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=81b181fe72b3d605b74a781294f69fa1de7c9cc9

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Mon Oct 28 22:18:05 2013 +0100

ntdll/tests: Use BOOL type where appropriate.

---

 dlls/ntdll/tests/error.c |    6 +++---
 dlls/ntdll/tests/info.c  |    2 +-
 dlls/ntdll/tests/time.c  |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/ntdll/tests/error.c b/dlls/ntdll/tests/error.c
index d9c83b3..862f0a9 100644
--- a/dlls/ntdll/tests/error.c
+++ b/dlls/ntdll/tests/error.c
@@ -50,7 +50,7 @@
 static ULONG (WINAPI *pRtlNtStatusToDosError)(NTSTATUS Status);
 static int strict;
 
-static int prepare_test(void)
+static BOOL prepare_test(void)
 {
     HMODULE ntdll;
     int argc;
@@ -61,12 +61,12 @@ static int prepare_test(void)
     if (!pRtlNtStatusToDosError)
     {
         win_skip("RtlNtStatusToDosError is not available\n");
-        return 0;
+        return FALSE;
     }
 
     argc = winetest_get_mainargs(&argv);
     strict=(argc >= 3 && strcmp(argv[2],"strict")==0);
-    return 1;
+    return TRUE;
 }
 
 static void cmp_call(NTSTATUS win_nt, ULONG win32, const char* message)
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
index 87f3c9c..d4f1e9e 100644
--- a/dlls/ntdll/tests/info.c
+++ b/dlls/ntdll/tests/info.c
@@ -259,7 +259,7 @@ static void test_query_process(void)
     DWORD last_pid;
     ULONG ReturnLength;
     int i = 0, k = 0;
-    int is_nt = 0;
+    BOOL is_nt = FALSE;
     SYSTEM_BASIC_INFORMATION sbi;
 
     /* Copy of our winternl.h structure turned into a private one */
diff --git a/dlls/ntdll/tests/time.c b/dlls/ntdll/tests/time.c
index ff80b84..48f4640 100644
--- a/dlls/ntdll/tests/time.c
+++ b/dlls/ntdll/tests/time.c
@@ -33,9 +33,9 @@ static const int MonthLengths[2][12] =
 	{ 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }
 };
 
-static inline int IsLeapYear(int Year)
+static inline BOOL IsLeapYear(int Year)
 {
-	return Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0) ? 1 : 0;
+    return Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0);
 }
 
 /* start time of the tests */




More information about the wine-cvs mailing list