Received: from eggs.gnu.org ([2001:4830:134:3::10]:53698) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UmMrP-0006QN-An for qemu-devel@nongnu.org; Tue, 11 Jun 2013 07:35:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UmMrN-0002DX-8q for qemu-devel@nongnu.org; Tue, 11 Jun 2013 07:35:35 -0400 Message-ID: <51B70B82.4000309@msgid.tls.msk.ru> Date: Tue, 11 Jun 2013 15:35:30 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1370927720-4348-1-git-send-email-lig.fnst@cn.fujitsu.com> <1370927720-4348-3-git-send-email-lig.fnst@cn.fujitsu.com> In-Reply-To: <1370927720-4348-3-git-send-email-lig.fnst@cn.fujitsu.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [Qemu-trivial] [PATCH 3/5] qemu-char: pass bool parameter for qemu_opt_get_bool List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: liguang Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org 11.06.2013 09:15, liguang wrote: > Signed-off-by: liguang > --- > qemu-char.c | 8 ++++---- > 1 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/qemu-char.c b/qemu-char.c > index d04b429..8092eb8 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -2767,10 +2767,10 @@ static CharDriverState *qemu_chr_open_socket(QemuOpts *opts) > int is_unix; > int is_telnet; > > - is_listen = qemu_opt_get_bool(opts, "server", 0); > - is_waitconnect = qemu_opt_get_bool(opts, "wait", 1); > - is_telnet = qemu_opt_get_bool(opts, "telnet", 0); > - do_nodelay = !qemu_opt_get_bool(opts, "delay", 1); > + is_listen = qemu_opt_get_bool(opts, "server", false); > + is_waitconnect = qemu_opt_get_bool(opts, "wait", true); > + is_telnet = qemu_opt_get_bool(opts, "telnet", false); > + do_nodelay = !qemu_opt_get_bool(opts, "delay", true); > is_unix = qemu_opt_get(opts, "path") != NULL; > if (!is_listen) > is_waitconnect = 0; While we're at it, all the is_* variables themselves should be made bool instead of int too. Thanks, /mjt