From: Max Kellermann Date: Thu, 11 Jun 2009 12:29:49 +0000 (+0200) Subject: mpdclient: convert MPD_ERROR() to an inline function X-Git-Tag: release-0.15~61 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1706ad1d356f91d561d7db61ff5359c72e44ba9c;p=ncmpc.git mpdclient: convert MPD_ERROR() to an inline function --- 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