From 8b4b7f51ae2ef4dbd781df5c551e68382489d3be Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonathan=20Neusch=C3=A4fer?= Date: Sun, 20 Nov 2011 00:52:15 +0100 Subject: [PATCH] main: don't show "connecting to (null)" This patch is a follow-up to commit b774eac8d9 ("main: don't show (null) as the server name"). --- src/main.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main.c b/src/main.c index 389b8c6..1e7caee 100644 --- a/src/main.c +++ b/src/main.c @@ -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 } -- 2.30.2