Code

mpdclient: remove unnecessary NULL check
authorMax Kellermann <max.kellermann@gmail.com>
Fri, 17 Mar 2017 22:38:58 +0000 (23:38 +0100)
committerMax Kellermann <max.kellermann@gmail.com>
Fri, 17 Mar 2017 22:38:58 +0000 (23:38 +0100)
src/mpdclient.c

index 3db559b3640c4872fe592159ea430b2667c707f3..f500c9adb689de508b7de4673f73dbe141b72396 100644 (file)
@@ -166,8 +166,7 @@ mpdclient_connect(struct mpdclient *c,
                  const gchar *password)
 {
        /* close any open connection */
-       if (c->connection)
-               mpdclient_disconnect(c);
+       mpdclient_disconnect(c);
 
        /* connect to MPD */
        c->connection = mpd_connection_new(host, port, timeout_ms);