Code

screen: removed NULL check
authorMax Kellermann <max@duempel.org>
Wed, 17 Sep 2008 22:57:50 +0000 (00:57 +0200)
committerMax Kellermann <max@duempel.org>
Wed, 17 Sep 2008 22:57:50 +0000 (00:57 +0200)
Since the screen's initialization is guaranteed, we can remove the
NULL check in center_playing_item().

src/screen_play.c

index 1f844f943956d1514dd685e76a743b016f977325..75462ccf95481e7c60dd48743c5d6cbbba1e7b7f 100644 (file)
@@ -99,8 +99,7 @@ center_playing_item(mpdclient_t *c)
        unsigned offset = lw->selected - lw->start;
        int idx;
 
-       if (!lw || !c->song || length<lw->rows ||
-           IS_STOPPED(c->status->state))
+       if (!c->song || length<lw->rows || IS_STOPPED(c->status->state))
                return;
 
        /* try to center the song that are playing */