提交 f2adc3b4 编写于 作者: O Osier Yang

cleanup: Change datatype of usbdev->allow to boolean

上级 00b6828d
......@@ -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'"));
......
......@@ -1440,7 +1440,7 @@ struct _virDomainRedirFilterUsbDevDef {
int vendor;
int product;
int version;
unsigned int allow :1;
bool allow;
};
struct _virDomainRedirFilterDef {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册