Code

lyrics: don't check current.lines==NULL
authorMax Kellermann <max@duempel.org>
Wed, 17 Sep 2008 10:25:48 +0000 (12:25 +0200)
committerMax Kellermann <max@duempel.org>
Wed, 17 Sep 2008 10:25:48 +0000 (12:25 +0200)
current.lines is always initialized, and cannot be NULL, no need to
check it.

src/screen_lyrics.c

index cae07a73be14149fed98e75278a26c01f6b224eb..c2c7807235fd628c065ce186db429f250a2f5a11 100644 (file)
@@ -207,8 +207,8 @@ static int store_lyr_hd(void)
 static const char *
 list_callback(unsigned idx, mpd_unused int *highlight, mpd_unused void *data)
 {
-       if (current.lines == NULL || idx >= current.lines->len)
-               return "";
+       if (idx >= current.lines->len)
+               return NULL;
 
        return g_ptr_array_index(current.lines, idx);
 }