From: Max Kellermann Date: Wed, 17 Sep 2008 10:25:48 +0000 (+0200) Subject: lyrics: don't check current.lines==NULL X-Git-Tag: v0.12_alpha1~267 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3a278a50a6cc0df63c862a6bdee95d158b74e625;p=ncmpc.git lyrics: don't check current.lines==NULL current.lines is always initialized, and cannot be NULL, no need to check it. --- diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c index cae07a7..c2c7807 100644 --- a/src/screen_lyrics.c +++ b/src/screen_lyrics.c @@ -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); }