提交 65da41de 编写于 作者: P Peter Krempa

conf: disk: Remove one unnecessary level of indentation

Also simplify the code by switching to a for loop.
上级 4bbac0f9
......@@ -6760,9 +6760,10 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
rawio = virXMLPropString(node, "rawio");
sgio = virXMLPropString(node, "sgio");
cur = node->children;
while (cur != NULL) {
if (cur->type == XML_ELEMENT_NODE) {
for (cur = node->children; cur != NULL; cur = cur->next) {
if (cur->type != XML_ELEMENT_NODE)
continue;
if (!source && xmlStrEqual(cur->name, BAD_CAST "source")) {
sourceNode = cur;
......@@ -7176,8 +7177,6 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
/* boot is parsed as part of virDomainDeviceInfoParseXML */
}
}
cur = cur->next;
}
/* Disk volume types will have authentication information handled in
* virStorageTranslateDiskSourcePool
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册