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

Alexandre Julliard julliard at winehq.org
Thu Feb 27 14:49:23 CST 2014


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

Author: Frédéric Delanoy <frederic.delanoy at gmail.com>
Date:   Thu Feb 27 00:21:02 2014 +0100

dplayx: Use BOOL type where appropriate.

---

 dlls/dplayx/dplay.c         |    2 +-
 dlls/dplayx/dplayx_global.c |    8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c
index 0314597..36e97a6 100644
--- a/dlls/dplayx/dplay.c
+++ b/dlls/dplayx/dplay.c
@@ -1660,7 +1660,7 @@ static HRESULT DP_IF_CreatePlayer( IDirectPlayImpl *This, void *lpMsgHdr, DPID *
   }
 
 #if 1
-  if( This->dp2->bHostInterface == FALSE )
+  if( !This->dp2->bHostInterface )
   {
     /* Let the name server know about the creation of this player */
     /* FIXME: Is this only to be done for the creation of a server player or
diff --git a/dlls/dplayx/dplayx_global.c b/dlls/dplayx/dplayx_global.c
index 64c4bc3..55a7386 100644
--- a/dlls/dplayx/dplayx_global.c
+++ b/dlls/dplayx/dplayx_global.c
@@ -83,7 +83,7 @@ static LPVOID lpSharedStaticData = NULL;
 
 typedef struct
 {
-  DWORD used;
+  BOOL used;
   DWORD data[dwBlockSize-sizeof(DWORD)];
 } DPLAYX_MEM_SLICE;
 
@@ -103,7 +103,7 @@ static void DPLAYX_PrivHeapFree( LPVOID addr )
   lpAddrStart = (char*)addr - sizeof(DWORD); /* Find block header */
   dwBlockUsed =  ((BYTE*)lpAddrStart - (BYTE*)lpMemArea)/dwBlockSize;
 
-  lpMemArea[ dwBlockUsed ].used = 0;
+  lpMemArea[ dwBlockUsed ].used = FALSE;
 }
 
 static LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size )
@@ -119,12 +119,12 @@ static LPVOID DPLAYX_PrivHeapAlloc( DWORD flags, DWORD size )
 
   /* Find blank area */
   uBlockUsed = 0;
-  while( ( lpMemArea[ uBlockUsed ].used != 0 ) && ( uBlockUsed <= dwMaxBlock ) ) { uBlockUsed++; }
+  while( lpMemArea[ uBlockUsed ].used && uBlockUsed <= dwMaxBlock ) { uBlockUsed++; }
 
   if( uBlockUsed <= dwMaxBlock )
   {
     /* Set the area used */
-    lpMemArea[ uBlockUsed ].used = 1;
+    lpMemArea[ uBlockUsed ].used = TRUE;
     lpvArea = lpMemArea[ uBlockUsed ].data;
   }
   else




More information about the wine-cvs mailing list