diff mbox

[4/8] vnc/spice: fix "never" and "now" expire_time

Message ID 1295886049-30548-5-git-send-email-kraxel@redhat.com
State New
Headers show

Commit Message

Gerd Hoffmann Jan. 24, 2011, 4:20 p.m. UTC
From: Marc-André Lureau <marcandre.lureau@redhat.com>


Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 monitor.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/monitor.c b/monitor.c
index 4c92d38..6aa1bb9 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);