From 88187e4e0364c9c38008df05fff43428cdc41887 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 19 Mar 2017 10:42:00 +0100 Subject: [PATCH] main: merge exit_and_cleanup() into main() There's no point in having this function that is called only once. --- src/main.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/main.c b/src/main.c index 12bee3d..af67327 100644 --- a/src/main.c +++ b/src/main.c @@ -90,18 +90,6 @@ update_xterm_title(void) } #endif -static void -exit_and_cleanup(void) -{ - screen_exit(); -#ifndef NCMPC_MINI - set_xterm_title(""); -#endif - printf("\n"); - - mpdclient_free(mpd); -} - #ifndef WIN32 static void catch_sigint(gcc_unused int sig) @@ -626,7 +614,13 @@ main(int argc, const char *argv[]) ncmpc_lirc_close(); #endif - exit_and_cleanup(); + screen_exit(); +#ifndef NCMPC_MINI + set_xterm_title(""); +#endif + printf("\n"); + + mpdclient_free(mpd); #ifdef ENABLE_LYRICS_SCREEN lyrics_deinit(); -- 2.30.2