Code

Merge remote branches 'jn/cosmetics', 'jn/doxygen' and 'jn/renames'
[ncmpc.git] / src / main.c
index 511ebaaebdb1a0367e6321e2f3c242e27af86bb7..7e3e3df114055dabaa6087c172e6dbf462bc1010 100644 (file)
@@ -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
 }