afs.c: Simplify activate_mood_or_playlist().
authorAndre Noll <maan@systemlinux.org>
Fri, 23 Nov 2007 09:33:41 +0000 (10:33 +0100)
committerAndre Noll <maan@systemlinux.org>
Fri, 23 Nov 2007 09:33:41 +0000 (10:33 +0100)
This also gets rid of

warning: `mode' might be used uninitialized in this function

on gcc-3.3.3.

afs.c

diff --git a/afs.c b/afs.c
index 8a60166..6c60b08 100644 (file)
--- a/afs.c
+++ b/afs.c
@@ -541,7 +541,7 @@ static int activate_mood_or_playlist(char *arg, int *num_admissible)
                        ret = change_current_mood(arg + 2);
                        mode = PLAY_MODE_MOOD;
                } else
-                       ret = -E_AFS_SYNTAX;
+                       return -E_AFS_SYNTAX;
                if (ret < 0)
                        return ret;
        }