From f2adc3b435157d63ff9b5f4835adbc87a0689d70 Mon Sep 17 00:00:00 2001 From: Osier Yang Date: Fri, 12 Apr 2013 16:51:36 +0800 Subject: [PATCH] cleanup: Change datatype of usbdev->allow to boolean --- src/conf/domain_conf.c | 4 ++-- src/conf/domain_conf.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 6ee575f78f..e9c97d0c63 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 47143d43d8..8f35f6e528 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 { -- 2.47.2