From: Osier Yang Date: Fri, 12 Apr 2013 08:51:36 +0000 (+0800) Subject: cleanup: Change datatype of usbdev->allow to boolean X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f2adc3b435157d63ff9b5f4835adbc87a0689d70;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git cleanup: Change datatype of usbdev->allow to boolean --- diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6ee575f78..e9c97d0c6 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -8679,9 +8679,9 @@ virDomainRedirFilterUsbDevDefParseXML(const xmlNodePtr node) allow = virXMLPropString(node, "allow"); if (allow) { if (STREQ(allow, "yes")) - def->allow = 1; + def->allow = true; else if (STREQ(allow, "no")) - def->allow = 0; + def->allow = false; else { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("Invalid allow value, either 'yes' or 'no'")); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 47143d43d..8f35f6e52 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1440,7 +1440,7 @@ struct _virDomainRedirFilterUsbDevDef { int vendor; int product; int version; - unsigned int allow :1; + bool allow; }; struct _virDomainRedirFilterDef {