From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=32787 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiOqD-0006u6-93 for qemu-devel@nongnu.org; Thu, 27 Jan 2011 05:12:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PiOqA-0005Rc-N9 for qemu-devel@nongnu.org; Thu, 27 Jan 2011 05:12:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:61114) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PiOqA-0005R7-C7 for qemu-devel@nongnu.org; Thu, 27 Jan 2011 05:12:34 -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 p0RACXiG029397 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 27 Jan 2011 05:12:33 -0500 From: Gerd Hoffmann Date: Thu, 27 Jan 2011 11:12:26 +0100 Message-Id: <1296123150-11599-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1296123150-11599-1-git-send-email-kraxel@redhat.com> References: <1296123150-11599-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?= 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 384d87b..aefbe92 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