From: Max Kellermann Date: Fri, 17 Mar 2017 22:27:12 +0000 (+0100) Subject: main: remove unnecessary "mpd!=NULL" checks X-Git-Tag: v0.26~49 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=863d4041a6d0c7b9ac117a8de4acf505ddb40a7f;p=ncmpc.git main: remove unnecessary "mpd!=NULL" checks --- diff --git a/src/main.c b/src/main.c index fe21c6b..88e6f22 100644 --- a/src/main.c +++ b/src/main.c @@ -74,12 +74,8 @@ static guint check_key_bindings_source_id; static void update_xterm_title(void) { - struct mpd_status *status = NULL; - const struct mpd_song *song = NULL; - if (mpd) { - status = mpd->status; - song = mpd->song; - } + struct mpd_status *status = mpd->status; + const struct mpd_song *song = mpd->song; char tmp[BUFSIZE]; if (options.xterm_title_format && status && song && @@ -105,9 +101,7 @@ exit_and_cleanup(void) #endif printf("\n"); - if (mpd) { - mpdclient_free(mpd); - } + mpdclient_free(mpd); } #ifndef WIN32