diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/mixer.c | 5 | ||||
| -rw-r--r-- | src/pcm.c | 6 | 
2 files changed, 3 insertions, 8 deletions
diff --git a/src/mixer.c b/src/mixer.c index 5b07f15..56e2293 100644 --- a/src/mixer.c +++ b/src/mixer.c @@ -244,10 +244,7 @@ struct _snd_mixer_selem_id {  int  snd_mixer_selem_id_malloc(snd_mixer_selem_id_t **ptr)  { -   if (!(*ptr = calloc(1, sizeof(**ptr)))) -      return -1; - -   return 0; +   return ((*ptr = calloc(1, sizeof(**ptr))) ? 0 : -1);  }  void @@ -600,8 +600,7 @@ int  snd_pcm_hw_params_malloc(snd_pcm_hw_params_t **ptr)  {     // OpenAL-soft uses this :( -   *ptr = calloc(1, sizeof(**ptr)); -   return (*ptr ? 0 : -1); +   return ((*ptr = calloc(1, sizeof(**ptr))) ? 0 : -1);  }  void @@ -920,8 +919,7 @@ int  snd_pcm_sw_params_malloc(snd_pcm_sw_params_t **ptr)  {     // OpenAL-soft uses this :( -   *ptr = calloc(1, sizeof(**ptr)); -   return (*ptr ? 0 : -1); +   return ((*ptr = calloc(1, sizeof(**ptr))) ? 0 : -1);  }  void  | 
