changeset 4563:8084f49a930a

Silence some pointless warnings in resume_playback_on_startup() by not using g_return_if_fail().
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 21 May 2008 04:45:43 +0300
parents a6d0f9d6198a
children ccb7d3529950
files src/audacious/main.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/main.c	Wed May 21 04:43:12 2008 +0300
+++ b/src/audacious/main.c	Wed May 21 04:45:43 2008 +0300
@@ -591,11 +591,12 @@
 static void
 resume_playback_on_startup()
 {
-    g_return_if_fail(cfg.resume_playback_on_startup);
-    g_return_if_fail(cfg.resume_playback_on_startup_time != -1);
-    g_return_if_fail(playlist_get_length(playlist_get_active()) > 0);
-
-    int i;
+    gint i;
+    
+    if (!cfg.resume_playback_on_startup ||
+        cfg.resume_playback_on_startup_time == -1 ||
+        playlist_get_length(playlist_get_active()) <= 0)
+        return;
 
     while (gtk_events_pending()) gtk_main_iteration();