Received: from [140.186.70.92] (port=60874 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PanJT-0001Mi-Pp for qemu-devel@nongnu.org; Thu, 06 Jan 2011 05:43:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PanJS-0003fS-Cz for qemu-devel@nongnu.org; Thu, 06 Jan 2011 05:43:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:29259) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PanJS-0003ew-5c for qemu-devel@nongnu.org; Thu, 06 Jan 2011 05:43:22 -0500 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p06AhKEC017272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 6 Jan 2011 05:43:20 -0500 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 6 Jan 2011 11:43:17 +0100 Message-Id: <1294310597-30720-1-git-send-email-marcandre.lureau@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH] 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?= , kraxel@redhat.com From: Marc-Andr=C3=A9 Lureau --- monitor.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index f258000..038d532 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.3.4