mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-31 18:15:25 +00:00
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.
This commit is contained in:
parent
6d8b6d2847
commit
ca70db398e
@ -16421,10 +16421,9 @@ virDomainDefParseXML(xmlDocPtr xml,
|
||||
goto error;
|
||||
for (i = 0; i < n; i++) {
|
||||
j = def->nvideos;
|
||||
virDomainVideoDefPtr video = virDomainVideoDefParseXML(nodes[j],
|
||||
def,
|
||||
flags);
|
||||
if (!video)
|
||||
virDomainVideoDefPtr video;
|
||||
|
||||
if (!(video = virDomainVideoDefParseXML(nodes[i], def, flags)))
|
||||
goto error;
|
||||
|
||||
if (video->primary) {
|
||||
|
Loading…
Reference in New Issue
Block a user