From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=52639 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pcd24-0002Co-N1 for qemu-devel@nongnu.org; Tue, 11 Jan 2011 07:09:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pcd1b-0008FK-Tr for qemu-devel@nongnu.org; Tue, 11 Jan 2011 07:08:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1026) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pcd1b-0008F8-N2 for qemu-devel@nongnu.org; Tue, 11 Jan 2011 07:08:31 -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 p0BC8UKV000839 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 11 Jan 2011 07:08:31 -0500 From: Gerd Hoffmann Date: Tue, 11 Jan 2011 13:08:24 +0100 Message-Id: <1294747706-31382-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1294747706-31382-1-git-send-email-kraxel@redhat.com> References: <1294747706-31382-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/6] 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 9d6d2d4..6f5ee14 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