msi/tests: Use BOOL type where appropriate
Frédéric Delanoy
frederic.delanoy at gmail.com
Sat Oct 26 07:01:21 CDT 2013
---
dlls/msi/tests/msi.c | 16 ++++++++--------
dlls/msi/tests/record.c | 11 +++++------
2 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/dlls/msi/tests/msi.c b/dlls/msi/tests/msi.c
index c2deb31..95fe97f 100644
--- a/dlls/msi/tests/msi.c
+++ b/dlls/msi/tests/msi.c
@@ -13062,7 +13062,7 @@ done:
static void test_MsiEnumComponents(void)
{
UINT r;
- int found1, found2;
+ BOOL found1, found2;
DWORD index;
char comp1[39], comp2[39], guid[39];
char comp_squashed1[33], comp_squashed2[33];
@@ -13105,11 +13105,11 @@ static void test_MsiEnumComponents(void)
index = 0;
guid[0] = 0;
- found1 = found2 = 0;
+ found1 = found2 = FALSE;
while (!MsiEnumComponentsA( index, guid ))
{
- if (!strcmp( guid, comp1 )) found1 = 1;
- if (!strcmp( guid, comp2 )) found2 = 1;
+ if (!strcmp( guid, comp1 )) found1 = TRUE;
+ if (!strcmp( guid, comp2 )) found2 = TRUE;
ok( guid[0], "empty guid\n" );
guid[0] = 0;
index++;
@@ -13128,7 +13128,7 @@ done:
static void test_MsiEnumComponentsEx(void)
{
UINT r;
- int found1, found2;
+ BOOL found1, found2;
DWORD len, index;
MSIINSTALLCONTEXT context;
char comp1[39], comp2[39], guid[39], sid[128];
@@ -13181,7 +13181,7 @@ static void test_MsiEnumComponentsEx(void)
context = 0xdeadbeef;
sid[0] = 0;
len = sizeof(sid);
- found1 = found2 = 0;
+ found1 = found2 = FALSE;
while (!pMsiEnumComponentsExA( "S-1-1-0", MSIINSTALLCONTEXT_ALL, index, guid, &context, sid, &len ))
{
if (!strcmp( comp1, guid ))
@@ -13189,14 +13189,14 @@ static void test_MsiEnumComponentsEx(void)
ok( context == MSIINSTALLCONTEXT_MACHINE, "got %u\n", context );
ok( !sid[0], "got \"%s\"\n", sid );
ok( !len, "unexpected length %u\n", len );
- found1 = 1;
+ found1 = TRUE;
}
if (!strcmp( comp2, guid ))
{
ok( context == MSIINSTALLCONTEXT_USERUNMANAGED, "got %u\n", context );
ok( sid[0], "empty sid\n" );
ok( len == strlen(sid), "unexpected length %u\n", len );
- found2 = 1;
+ found2 = TRUE;
}
index++;
guid[0] = 0;
diff --git a/dlls/msi/tests/record.c b/dlls/msi/tests/record.c
index 90d8bb8..44079f4 100644
--- a/dlls/msi/tests/record.c
+++ b/dlls/msi/tests/record.c
@@ -30,18 +30,17 @@ static const WCHAR msifileW[] =
static BOOL create_temp_file(char *name)
{
- UINT r;
+ BOOL r;
unsigned char buffer[26], i;
DWORD sz;
HANDLE handle;
-
- r = GetTempFileNameA(".", "msitest",0,name);
- if(!r)
- return r;
+
+ if (!GetTempFileNameA(".", "msitest",0,name));
+ return FALSE;
handle = CreateFileA(name, GENERIC_READ|GENERIC_WRITE,
0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
if(handle==INVALID_HANDLE_VALUE)
- return 0;
+ return FALSE;
for(i=0; i<26; i++)
buffer[i]=i+'a';
r = WriteFile(handle,buffer,sizeof buffer,&sz,NULL);
--
1.8.4.1
More information about the wine-patches
mailing list