From 7a984d57131ab438709608e9d6f50a533292472e Mon Sep 17 00:00:00 2001 From: Osier Yang Date: Wed, 10 Apr 2013 18:54:17 +0800 Subject: [PATCH] cleanup: Change datatype of auth->expires to boolean --- src/conf/domain_conf.c | 2 +- src/conf/domain_conf.h | 2 +- src/parallels/parallels_driver.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 9754b72ea1..30a65e75df 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -7091,7 +7091,7 @@ virDomainGraphicsAuthDefParseXML(xmlNodePtr node, tm.tm_mon--; /* Humans start months at 1, computers at 0 */ def->validTo = timegm(&tm); - def->expires = 1; + def->expires = true; } if (connected) { diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index f70ebb55db..d046c1002c 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1227,7 +1227,7 @@ typedef struct _virDomainGraphicsAuthDef virDomainGraphicsAuthDef; typedef virDomainGraphicsAuthDef *virDomainGraphicsAuthDefPtr; struct _virDomainGraphicsAuthDef { char *passwd; - unsigned int expires: 1; /* Whether there is an expiry time set */ + bool expires; /* Whether there is an expiry time set */ time_t validTo; /* seconds since epoch */ int connected; /* action if connected */ }; diff --git a/src/parallels/parallels_driver.c b/src/parallels/parallels_driver.c index c524bf1c30..451e948527 100644 --- a/src/parallels/parallels_driver.c +++ b/src/parallels/parallels_driver.c @@ -629,7 +629,7 @@ parallelsAddVNCInfo(virDomainDefPtr def, virJSONValuePtr jobj_root) gr->data.vnc.keymap = NULL; gr->data.vnc.socket = NULL; gr->data.vnc.auth.passwd = NULL; - gr->data.vnc.auth.expires = 0; + gr->data.vnc.auth.expires = false; gr->data.vnc.auth.connected = 0; if (!(tmp = virJSONValueObjectGetString(jobj, "address"))) {