From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxGfD-0001U8-0Y for qemu-devel@nongnu.org; Tue, 26 May 2015 11:21:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxGf7-0006kl-Of for qemu-devel@nongnu.org; Tue, 26 May 2015 11:21:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59527) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxGf7-0006kH-I1 for qemu-devel@nongnu.org; Tue, 26 May 2015 11:21:01 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4QFL056015673 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 26 May 2015 11:21:01 -0400 From: Markus Armbruster Date: Tue, 26 May 2015 17:20:47 +0200 Message-Id: <1432653655-30745-13-git-send-email-armbru@redhat.com> In-Reply-To: <1432653655-30745-1-git-send-email-armbru@redhat.com> References: <1432653655-30745-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH v2 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 Reviewed-by: Eric Blake --- monitor.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/monitor.c b/monitor.c index 5a13cd2..f7e8fdf 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; @@ -5029,7 +5024,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