From 863d4041a6d0c7b9ac117a8de4acf505ddb40a7f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 17 Mar 2017 23:27:12 +0100 Subject: [PATCH] main: remove unnecessary "mpd!=NULL" checks --- src/main.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) 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 -- 2.30.2