Code

mpdclient: convert MPD_ERROR() to an inline function
authorMax Kellermann <max@duempel.org>
Thu, 11 Jun 2009 12:29:49 +0000 (14:29 +0200)
committerMax Kellermann <max@duempel.org>
Thu, 11 Jun 2009 12:29:49 +0000 (14:29 +0200)
src/mpdclient.c

index aeaf44b803fe86933a54c16214bfbae27d27f81d..fecdf493030871377af5905315ccbfff7e2231cb 100644 (file)
 
 #define BUFSIZE 1024
 
-#define MPD_ERROR(c) (c==NULL || c->connection==NULL || c->connection->error)
+static bool
+MPD_ERROR(const struct mpdclient *client)
+{
+       return client == NULL || client->connection==NULL ||
+               client->connection->error != MPD_ERROR_SUCCESS;
+}
 
 /* filelist sorting functions */
 static gint