From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41371) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvlFi-0003JW-FM for qemu-devel@nongnu.org; Fri, 22 May 2015 07:36:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvlFf-0001RA-6I for qemu-devel@nongnu.org; Fri, 22 May 2015 07:36:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvlFf-0001Qs-0C for qemu-devel@nongnu.org; Fri, 22 May 2015 07:36:31 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4MBaUOf024451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 22 May 2015 07:36:30 -0400 From: Markus Armbruster Date: Fri, 22 May 2015 13:36:17 +0200 Message-Id: <1432294585-5984-13-git-send-email-armbru@redhat.com> In-Reply-To: <1432294585-5984-1-git-send-email-armbru@redhat.com> References: <1432294585-5984-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 12/20] monitor: Inline monitor_has_error() into its only caller List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lcapitulino@redhat.com Signed-off-by: Markus Armbruster --- monitor.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/monitor.c b/monitor.c index c732203..71ca03f 100644 --- a/monitor.c +++ b/monitor.c @@ -377,11 +377,6 @@ static int GCC_FMT_ATTR(2, 3) monitor_fprintf(FILE *stream, return 0; } -static inline int monitor_has_error(const Monitor *mon) -{ - return mon->error != NULL; -} - static void monitor_json_emitter(Monitor *mon, const QObject *data) { QString *json; @@ -5031,7 +5026,7 @@ static void handle_qmp_command(JSONMessageParser *parser, QList *tokens) if (cmd->mhandler.cmd_new(mon, args, &data)) { /* Command failed... */ - if (!monitor_has_error(mon)) { + if (!mon->error) { /* ... without setting an error, so make one up */ qerror_report(QERR_UNDEFINED_ERROR); } -- 1.9.3