qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 4/6] vnc/spice: fix "never" and "now" expire_time


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH 4/6] vnc/spice: fix "never" and "now" expire_time
Date: Mon, 10 Jan 2011 14:31:49 +0100

From: Marc-André Lureau <address@hidden>


Signed-off-by: Gerd Hoffmann <address@hidden>
---
 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 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);
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]