From 1706ad1d356f91d561d7db61ff5359c72e44ba9c Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 11 Jun 2009 14:29:49 +0200 Subject: [PATCH] mpdclient: convert MPD_ERROR() to an inline function --- src/mpdclient.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mpdclient.c b/src/mpdclient.c index aeaf44b..fecdf49 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -37,7 +37,12 @@ #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 -- 2.30.2