Style nits.

This commit is contained in:
Themaister 2011-10-15 12:54:47 +02:00
parent 0ff3cbc93b
commit 48e015558e
3 changed files with 17 additions and 23 deletions

View File

@ -52,14 +52,14 @@ static bool find_float_format(snd_pcm_t *pcm, snd_pcm_hw_params_t *params)
static void* __alsa_init(const char* device, unsigned rate, unsigned latency)
{
alsa_t *alsa = calloc(1, sizeof(alsa_t));
if ( alsa == NULL )
if (!alsa)
return NULL;
snd_pcm_hw_params_t *params = NULL;
snd_pcm_sw_params_t *sw_params = NULL;
const char *alsa_dev = "default";
if ( device != NULL )
if (device)
alsa_dev = device;
TRY_ALSA(snd_pcm_open(&alsa->pcm, alsa_dev, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK));
@ -200,8 +200,3 @@ const audio_driver_t audio_alsa = {
.ident = "alsa"
};

View File

@ -60,7 +60,7 @@ static void* __al_init(const char* device, unsigned rate, unsigned latency)
{
(void)device;
al_t *al = calloc(1, sizeof(al_t));
if ( al == NULL )
if (!al)
return NULL;
al->handle = alcOpenDevice(NULL);
@ -244,4 +244,3 @@ const audio_driver_t audio_openal = {
.ident = "openal"
};

View File

@ -57,7 +57,7 @@ static void err_cb(void *userdata)
static void* __rsd_init(const char* device, unsigned rate, unsigned latency)
{
rsd_t *rsd = calloc(1, sizeof(rsd_t));
if ( rsd == NULL )
if (!rsd)
return NULL;
rsound_t *rd;
@ -80,7 +80,7 @@ static void* __rsd_init(const char* device, unsigned rate, unsigned latency)
rsd_set_param(rd, RSD_SAMPLERATE, &rate);
rsd_set_param(rd, RSD_LATENCY, &latency);
if ( device != NULL )
if (device)
rsd_set_param(rd, RSD_HOST, (void*)device);
rsd_set_param(rd, RSD_FORMAT, &format);