提交 ca70db39 编写于 作者: J Ján Tomko

conf: use the iterator directly when parsing video devices

We start with both i and def->nvideos at 0 and increment both
after every successful iteration.

Use i directly, instead of passing the def->nvideos value through j.
上级 6d8b6d28
...@@ -16421,10 +16421,9 @@ virDomainDefParseXML(xmlDocPtr xml, ...@@ -16421,10 +16421,9 @@ virDomainDefParseXML(xmlDocPtr xml,
goto error; goto error;
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
j = def->nvideos; j = def->nvideos;
virDomainVideoDefPtr video = virDomainVideoDefParseXML(nodes[j], virDomainVideoDefPtr video;
def,
flags); if (!(video = virDomainVideoDefParseXML(nodes[i], def, flags)))
if (!video)
goto error; goto error;
if (video->primary) { if (video->primary) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册