From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=51308 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PhPAF-0004iw-9g for qemu-devel@nongnu.org; Mon, 24 Jan 2011 11:21:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PhPA3-0005oh-Mf for qemu-devel@nongnu.org; Mon, 24 Jan 2011 11:21:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54858) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PhPA3-0005oM-Ed for qemu-devel@nongnu.org; Mon, 24 Jan 2011 11:20:59 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0OGKwn6005842 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 24 Jan 2011 11:20:58 -0500 From: Gerd Hoffmann Date: Mon, 24 Jan 2011 17:20:45 +0100 Message-Id: <1295886049-30548-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1295886049-30548-1-git-send-email-kraxel@redhat.com> References: <1295886049-30548-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 4/8] vnc/spice: fix "never" and "now" expire_time List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Gerd Hoffmann From: Marc-Andr=C3=A9 Lureau Signed-off-by: Gerd Hoffmann --- monitor.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index 4c92d38..6aa1bb9 100644 --- a/monitor.c +++ b/monitor.c @@ -1136,9 +1136,9 @@ static int expire_password(Monitor *mon, const QDic= t *qdict, QObject **ret_data) time_t when; int rc; =20 - if (strcmp(whenstr, "now")) { + if (strcmp(whenstr, "now") =3D=3D 0) { when =3D 0; - } else if (strcmp(whenstr, "never")) { + } else if (strcmp(whenstr, "never") =3D=3D 0) { when =3D TIME_MAX; } else if (whenstr[0] =3D=3D '+') { when =3D time(NULL) + strtoull(whenstr+1, NULL, 10); --=20 1.7.1