From dc2ca39d99147982225129254d5919b8e743f3eb Mon Sep 17 00:00:00 2001 From: Andrew Riedi Date: Thu, 22 Nov 2007 19:25:56 -0800 Subject: [PATCH] winealsa.drv: Clean up waveinit.c. --- dlls/winealsa.drv/waveinit.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dlls/winealsa.drv/waveinit.c b/dlls/winealsa.drv/waveinit.c index 3e16c18..b32df50 100644 --- a/dlls/winealsa.drv/waveinit.c +++ b/dlls/winealsa.drv/waveinit.c @@ -72,7 +72,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wave); ** ** Test to see if a given device is sufficient for Wine. */ -static int ALSA_TestDeviceForWine(int card, int device, snd_pcm_stream_t streamtype) +static int ALSA_TestDeviceForWine(int card, int device, snd_pcm_stream_t streamtype) { snd_pcm_t *pcm = NULL; char pcmname[256]; @@ -89,7 +89,7 @@ static int ALSA_TestDeviceForWine(int card, int device, snd_pcm_stream_t stream if (retcode < 0) { /* Note that a busy device isn't automatically disqualified */ - if (retcode == (-1 * EBUSY)) + if (retcode == -EBUSY) retcode = 0; goto exit; } @@ -138,7 +138,7 @@ exit: snd_pcm_close(pcm); HeapFree( GetProcessHeap(), 0, hwparams ); - if (retcode != 0 && retcode != (-1 * ENOENT)) + if (retcode != 0 && retcode != -ENOENT) TRACE("Discarding card %d/device %d: %s [%d(%s)]\n", card, device, reason, retcode, snd_strerror(retcode)); return retcode; @@ -198,7 +198,7 @@ static int ALSA_RegGetBoolean(HKEY key, const char *value, BOOL *answer) } /*---------------------------------------------------------------------------- -** ALSA_RegGetBoolean +** ALSA_RegGetInt ** Get a string and interpret it as a DWORD */ static int ALSA_RegGetInt(HKEY key, const char *value, DWORD *answer) @@ -217,7 +217,8 @@ static int ALSA_RegGetInt(HKEY key, const char *value, DWORD *answer) } /* return a string duplicated on the win32 process heap, free with HeapFree */ -static char* ALSA_strdup(const char *s) { +static char* ALSA_strdup(const char *s) +{ char *result = HeapAlloc(GetProcessHeap(), 0, strlen(s)+1); if (!result) return NULL; @@ -481,7 +482,7 @@ static int ALSA_AddDeviceToArray(WINE_WAVEDEV *ww, WINE_WAVEDEV **array, */ static int ALSA_AddPlaybackDevice(snd_ctl_t *ctl, snd_pcm_t *pcm, const char *pcmname, int isdefault) { - WINE_WAVEDEV wwo; + WINE_WAVEDEV wwo; int rc; memset(&wwo, '\0', sizeof(wwo)); @@ -521,7 +522,7 @@ static int ALSA_AddPlaybackDevice(snd_ctl_t *ctl, snd_pcm_t *pcm, const char *pc */ static int ALSA_AddCaptureDevice(snd_ctl_t *ctl, snd_pcm_t *pcm, const char *pcmname, int isdefault) { - WINE_WAVEDEV wwi; + WINE_WAVEDEV wwi; int rc; memset(&wwi, '\0', sizeof(wwi)); -- 1.4.4.2