From 8d86e2bfe36ae8e03bf2ba0c8206b91e29ad292f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 6 Jan 2011 11:43:17 +0100 Subject: [PATCH] vnc/spice: fix "never" and "now" expire_time --- monitor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/monitor.c b/monitor.c index 4c92d38d9e..6aa1bb99ef 100644 --- a/monitor.c +++ b/monitor.c @@ -1136,9 +1136,9 @@ static int expire_password(Monitor *mon, const QDict *qdict, QObject **ret_data) time_t when; int rc; - if (strcmp(whenstr, "now")) { + if (strcmp(whenstr, "now") == 0) { when = 0; - } else if (strcmp(whenstr, "never")) { + } else if (strcmp(whenstr, "never") == 0) { when = TIME_MAX; } else if (whenstr[0] == '+') { when = time(NULL) + strtoull(whenstr+1, NULL, 10);