cleanup: Change datatype of usbdev->allow to boolean

This commit is contained in:
Osier Yang 2013-04-12 16:51:36 +08:00
parent 00b6828dc2
commit f2adc3b435
2 changed files with 3 additions and 3 deletions

View File

@ -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'"));

View File

@ -1440,7 +1440,7 @@ struct _virDomainRedirFilterUsbDevDef {
int vendor;
int product;
int version;
unsigned int allow :1;
bool allow;
};
struct _virDomainRedirFilterDef {