summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2011-01-06 11:43:17 +0100
committerGerd Hoffmann <kraxel@redhat.com>2011-01-24 15:13:54 +0100
commit2e714b6af744935a1732319110ad9f4c481328dc (patch)
tree28985153618e5ac0a5d6c48ca119ef8a1ea1f58e /monitor.c
parent641736684c72b0fc8422f28abb14bc6bd463e6f0 (diff)
downloadqemu-2e714b6af744935a1732319110ad9f4c481328dc.tar.gz
qemu-2e714b6af744935a1732319110ad9f4c481328dc.tar.bz2
qemu-2e714b6af744935a1732319110ad9f4c481328dc.zip
vnc/spice: fix "never" and "now" expire_time
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c4
1 files 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);