changeset 2512:1f6b5f5768e2

Remove some completely useless null-pointer checks, g_free() checks the pointer anyway.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 02 Apr 2008 22:58:35 +0300
parents 58889ccbe807
children a4629703edc3
files src/madplug/input.c
diffstat 1 files changed, 10 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/src/madplug/input.c	Wed Apr 02 19:55:15 2008 +0300
+++ b/src/madplug/input.c	Wed Apr 02 22:58:35 2008 +0300
@@ -587,37 +587,27 @@
 {
     AUDDBG("f: input_term\n");
 
-    if (info->title)
-        g_free(info->title);
-    if (info->url)
-        g_free(info->url);
-    if (info->filename)
-        g_free(info->filename);
+    g_free(info->title);
+    g_free(info->url);
+    g_free(info->filename);
     if (info->infile)
         aud_vfs_fclose(info->infile);
     if (info->id3file)
         id3_file_close(info->id3file);
 
-    if (info->replaygain_album_str)
-        g_free(info->replaygain_album_str);
-    if (info->replaygain_track_str)
-        g_free(info->replaygain_track_str);
-    if (info->replaygain_album_peak_str)
-        g_free(info->replaygain_album_peak_str);
-    if (info->replaygain_track_peak_str)
-        g_free(info->replaygain_track_peak_str);
-    if (info->mp3gain_undo_str)
-        g_free(info->mp3gain_undo_str);
-    if (info->mp3gain_minmax_str)
-        g_free(info->mp3gain_minmax_str);
+    g_free(info->replaygain_album_str);
+    g_free(info->replaygain_track_str);
+    g_free(info->replaygain_album_peak_str);
+    g_free(info->replaygain_track_peak_str);
+    g_free(info->mp3gain_undo_str);
+    g_free(info->mp3gain_minmax_str);
 
     if (info->tuple) {
         aud_tuple_free(info->tuple);
         info->tuple = NULL;
     }
 
-    if (info->prev_title)
-        g_free(info->prev_title);
+    g_free(info->prev_title);
 
     /* set everything to zero in case it gets used again. */
     memset(info, 0, sizeof(struct mad_info_t));