X-Git-Url: https://git.tokkee.org/?p=ncmpc.git;a=blobdiff_plain;f=src%2Fmain.c;h=7e3e3df114055dabaa6087c172e6dbf462bc1010;hp=511ebaaebdb1a0367e6321e2f3c242e27af86bb7;hb=8ba6b8463c9b53bcd6b05574d639eb9ac099a37a;hpb=0bd10bf6d49e2b196d8f246e13028e9242c62bb3 diff --git a/src/main.c b/src/main.c index 511ebaa..7e3e3df 100644 --- a/src/main.c +++ b/src/main.c @@ -27,7 +27,7 @@ #include "ncu.h" #include "screen.h" #include "screen_utils.h" -#include "screen_message.h" +#include "screen_status.h" #include "strfsong.h" #include "i18n.h" #include "player_command.h" @@ -271,7 +271,12 @@ default_settings_name(void) return name; #else - return g_strdup(options.host); + /* + * localhost is actually not correct, we only know that + * mpd_connection_new() has connected to the "default host". + */ + const char *name = options.host ?: "localhost"; + return g_strdup(name); #endif } @@ -288,12 +293,7 @@ connection_settings_name(const struct mpd_connection *connection) #else (void)connection; - /* - * localhost is actually not correct, we only know that - * mpd_connection_new() has connected to the "default host". - */ - const char *name = options.host ?: "localhost"; - return g_strdup(name); + return default_settings_name(); #endif }