diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-06-06 18:35:13 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-06-13 12:34:54 +0200 |
commit | fb7da626c0d178d687f439af2e19401f34bc901e (patch) | |
tree | 637ead7bd04678af8c72f6acaca186891a990ffa /audio/audio_template.h | |
parent | 2a2c4830c0068d70443f3dddc4cc668f0c601b5c (diff) |
audio: Drop superfluous conditionals around g_free()
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'audio/audio_template.h')
-rw-r--r-- | audio/audio_template.h | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/audio/audio_template.h b/audio/audio_template.h index 16f7880770..817318853c 100644 --- a/audio/audio_template.h +++ b/audio/audio_template.h @@ -71,10 +71,7 @@ static void glue (audio_init_nb_voices_, TYPE) (struct audio_driver *drv) static void glue (audio_pcm_hw_free_resources_, TYPE) (HW *hw) { - if (HWBUF) { - g_free (HWBUF); - } - + g_free (HWBUF); HWBUF = NULL; } @@ -92,9 +89,7 @@ static int glue (audio_pcm_hw_alloc_resources_, TYPE) (HW *hw) static void glue (audio_pcm_sw_free_resources_, TYPE) (SW *sw) { - if (sw->buf) { - g_free (sw->buf); - } + g_free (sw->buf); if (sw->rate) { st_rate_stop (sw->rate); @@ -172,10 +167,8 @@ static int glue (audio_pcm_sw_init_, TYPE) ( static void glue (audio_pcm_sw_fini_, TYPE) (SW *sw) { glue (audio_pcm_sw_free_resources_, TYPE) (sw); - if (sw->name) { - g_free (sw->name); - sw->name = NULL; - } + g_free (sw->name); + sw->name = NULL; } static void glue (audio_pcm_hw_add_sw_, TYPE) (HW *hw, SW *sw) |