Code

Merge remote branches 'jn/cosmetics', 'jn/doxygen' and 'jn/renames'
[ncmpc.git] / src / main.c
index 389b8c68e570f2c8eb52a22e0419a81cfa62f35d..7e3e3df114055dabaa6087c172e6dbf462bc1010 100644 (file)
@@ -15,7 +15,7 @@
  * You should have received a copy of the GNU General Public License along
  * with this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
+ */
 
 #include "config.h"
 #include "ncmpc.h"
@@ -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
 }