From patchwork Fri Jan 30 02:14:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gonglei (Arei)" X-Patchwork-Id: 434708 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2C5DC14012F for ; Fri, 30 Jan 2015 13:16:13 +1100 (AEDT) Received: from localhost ([::1]:34434 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH17z-0002Kf-BL for incoming@patchwork.ozlabs.org; Thu, 29 Jan 2015 21:16:11 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH17U-0001RI-GO for qemu-devel@nongnu.org; Thu, 29 Jan 2015 21:15:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YH17P-000578-Eo for qemu-devel@nongnu.org; Thu, 29 Jan 2015 21:15:40 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:43444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH17O-00056U-Pw for qemu-devel@nongnu.org; Thu, 29 Jan 2015 21:15:35 -0500 Received: from 172.24.2.119 (EHLO szxeml427-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CGN24385; Fri, 30 Jan 2015 10:15:24 +0800 (CST) Received: from localhost (10.177.19.102) by szxeml427-hub.china.huawei.com (10.82.67.182) with Microsoft SMTP Server id 14.3.158.1; Fri, 30 Jan 2015 10:15:13 +0800 From: To: Date: Fri, 30 Jan 2015 10:14:36 +0800 Message-ID: <1422584076-5728-4-git-send-email-arei.gonglei@huawei.com> X-Mailer: git-send-email 1.7.3.1.msysgit.0 In-Reply-To: <1422584076-5728-1-git-send-email-arei.gonglei@huawei.com> References: <1422584076-5728-1-git-send-email-arei.gonglei@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.19.102] X-CFilter-Loop: Reflected X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 119.145.14.65 Cc: Gonglei , kraxel@redhat.com, dslutz@verizon.com, peter.huangpeng@huawei.com Subject: [Qemu-devel] [PATCH v2 3/3] vnc: using bool type instead of int for QEMU_OPT_BOOL X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Gonglei Signed-off-by: Gonglei --- ui/vnc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 23f413e..4bae970 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3322,8 +3322,8 @@ void vnc_display_open(const char *id, Error **errp) QemuOpts *opts = qemu_opts_find(&qemu_vnc_opts, id); const char *share, *device_id; QemuConsole *con; - int password = 0; - int reverse = 0; + bool password = false; + bool reverse = false; const char *vnc; const char *has_to; char *display, *to = NULL; @@ -3333,11 +3333,11 @@ void vnc_display_open(const char *id, Error **errp) const char *websocket; #endif #ifdef CONFIG_VNC_TLS - int tls = 0, x509 = 0; + bool tls = false, x509 = false; const char *path; #endif #ifdef CONFIG_VNC_SASL - int sasl = 0; + bool sasl = false; int saslErr; #endif #if defined(CONFIG_VNC_TLS) || defined(CONFIG_VNC_SASL) @@ -3389,7 +3389,7 @@ void vnc_display_open(const char *id, Error **errp) tls = qemu_opt_get_bool(opts, "tls", false); path = qemu_opt_get(opts, "x509"); if (path) { - x509 = 1; + x509 = true; vs->tls.x509verify = qemu_opt_get_bool(opts, "x509verify", false); if (vnc_tls_set_x509_creds_dir(vs, path) < 0) { error_setg(errp, "Failed to find x509 certificates/keys in %s",