winealsa.drv: Use BOOL type where appropriate

Frédéric Delanoy frederic.delanoy at gmail.com
Fri Nov 29 18:47:02 CST 2013


---
 dlls/winealsa.drv/midi.c     | 14 +++++++-------
 dlls/winealsa.drv/mmdevdrv.c |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/dlls/winealsa.drv/midi.c b/dlls/winealsa.drv/midi.c
index 748fa79..4e74440 100644
--- a/dlls/winealsa.drv/midi.c
+++ b/dlls/winealsa.drv/midi.c
@@ -216,11 +216,11 @@ static void MIDI_NotifyClient(UINT wDevID, WORD wMsg,
     DriverCallback(dwCallBack, uFlags, hDev, wMsg, dwInstance, dwParam1, dwParam2);
 }
 
-static int midi_warn = 1;
+static BOOL midi_warn = TRUE;
 /**************************************************************************
  * 			midiOpenSeq				[internal]
  */
-static int midiOpenSeq(int create_client)
+static int midiOpenSeq(BOOL create_client)
 {
     if (numOpenMidiSeq == 0) {
 	if (snd_seq_open(&midiSeq, "default", SND_SEQ_OPEN_DUPLEX, 0) < 0)
@@ -229,7 +229,7 @@ static int midiOpenSeq(int create_client)
 	    {
 		WARN("Error opening ALSA sequencer.\n");
 	    }
-	    midi_warn = 0;
+            midi_warn = FALSE;
 	    return -1;
 	}
 
@@ -474,7 +474,7 @@ static DWORD midOpen(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
 	return MMSYSERR_INVALFLAG;
     }
 
-    if (midiOpenSeq(1) < 0) {
+    if (midiOpenSeq(TRUE) < 0) {
 	return MMSYSERR_ERROR;
     }
 
@@ -732,7 +732,7 @@ static DWORD modOpen(WORD wDevID, LPMIDIOPENDESC lpDesc, DWORD dwFlags)
     case MOD_FMSYNTH:
     case MOD_MIDIPORT:
     case MOD_SYNTH:
-	if (midiOpenSeq(1) < 0) {
+        if (midiOpenSeq(TRUE) < 0) {
 	    return MMSYSERR_ALLOCATED;
 	}
 	break;
@@ -1221,7 +1221,7 @@ static void ALSA_AddMidiPort(snd_seq_client_info_t* cinfo, snd_seq_port_info_t*
  *
  * Initializes the MIDI devices information variables
  */
-static LONG ALSA_MidiInit(void)
+static BOOL ALSA_MidiInit(void)
 {
     static	BOOL	bInitDone = FALSE;
     snd_seq_client_info_t *cinfo;
@@ -1234,7 +1234,7 @@ static LONG ALSA_MidiInit(void)
     bInitDone = TRUE;
 
     /* try to open device */
-    if (midiOpenSeq(0) == -1) {
+    if (midiOpenSeq(FALSE) == -1) {
 	return TRUE;
     }
 
diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c
index 6e854e4..3cfad3a 100644
--- a/dlls/winealsa.drv/mmdevdrv.c
+++ b/dlls/winealsa.drv/mmdevdrv.c
@@ -770,7 +770,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
     int err;
     snd_pcm_stream_t stream;
     snd_config_t *lconf;
-    static int handle_underrun = 1;
+    static BOOL handle_underrun = TRUE;
     char alsa_name[256];
     EDataFlow dataflow;
     HRESULT hr;
@@ -816,7 +816,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient
         if(err == -EINVAL){
             ERR_(winediag)("PulseAudio \"%s\" %d without handle_underrun. Audio may hang."
                            " Please upgrade to alsa_plugins >= 1.0.24\n", alsa_name, err);
-            handle_underrun = 0;
+            handle_underrun = FALSE;
         }
     }else
         err = -EINVAL;
-- 
1.8.5




More information about the wine-patches mailing list