From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyH2N-00076G-77 for qemu-devel@nongnu.org; Fri, 29 May 2015 05:57:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyH2K-0003f0-7q for qemu-devel@nongnu.org; Fri, 29 May 2015 05:57:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35841) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyH2K-0003ei-3t for qemu-devel@nongnu.org; Fri, 29 May 2015 05:57:08 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id AE2B551 for ; Fri, 29 May 2015 09:57:07 +0000 (UTC) From: Markus Armbruster Date: Fri, 29 May 2015 11:57:00 +0200 Message-Id: <1432893420-18687-22-git-send-email-armbru@redhat.com> In-Reply-To: <1432893420-18687-1-git-send-email-armbru@redhat.com> References: <1432893420-18687-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH v3 21/21] monitor: Change return type of monitor_cur_is_qmp() to bool 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 Reviewed-by: Luiz Capitulino --- include/monitor/monitor.h | 2 +- monitor.c | 6 ++++-- stubs/mon-is-qmp.c | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index d409b6a..57f8394 100644 --- a/include/monitor/monitor.h +++ b/include/monitor/monitor.h @@ -16,7 +16,7 @@ extern Monitor *default_mon; #define MONITOR_USE_CONTROL 0x04 #define MONITOR_USE_PRETTY 0x08 -int monitor_cur_is_qmp(void); +bool monitor_cur_is_qmp(void); void monitor_init(CharDriverState *chr, int flags); diff --git a/monitor.c b/monitor.c index 3426bdc..766032c 100644 --- a/monitor.c +++ b/monitor.c @@ -239,8 +239,10 @@ static inline bool monitor_is_qmp(const Monitor *mon) return (mon->flags & MONITOR_USE_CONTROL); } -/* Return non-zero iff we have a current monitor, and it is in QMP mode. */ -int monitor_cur_is_qmp(void) +/** + * Is the current monitor, if any, a QMP monitor? + */ +bool monitor_cur_is_qmp(void) { return cur_mon && monitor_is_qmp(cur_mon); } diff --git a/stubs/mon-is-qmp.c b/stubs/mon-is-qmp.c index 1f0a8fd..1ef136a 100644 --- a/stubs/mon-is-qmp.c +++ b/stubs/mon-is-qmp.c @@ -1,7 +1,7 @@ #include "qemu-common.h" #include "monitor/monitor.h" -int monitor_cur_is_qmp(void) +bool monitor_cur_is_qmp(void) { - return 0; + return false; } -- 1.9.3