Skip to contentSkip to conversation

vnc/spice: fix "never" and "now" expire_time

PATCH New Marc-André Lureau 1 participant 1 message Jan 6, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vnc/spice: fix "never" and "now" expire_time

From: Marc-André Lureau <[email protected]>

---
 monitor.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
monitor.c +2 -2
index f258000..038d532 100644
@@ -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);
Signature · 1 line
1.7.3.4