mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
virDomainDefFormatInternal: Drop useless check
There's a check if a domain definition has any graphics card and if so, we iterate over each one of them. This makes no sense, because even if it has none we can still iterate over. Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
702713af5a
commit
eeed7f6e75
@ -22363,11 +22363,9 @@ virDomainDefFormatInternal(virDomainDefPtr def,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (def->ngraphics > 0) {
|
||||
for (n = 0; n < def->ngraphics; n++)
|
||||
if (virDomainGraphicsDefFormat(buf, def->graphics[n], flags) < 0)
|
||||
goto error;
|
||||
}
|
||||
for (n = 0; n < def->ngraphics; n++)
|
||||
if (virDomainGraphicsDefFormat(buf, def->graphics[n], flags) < 0)
|
||||
goto error;
|
||||
|
||||
for (n = 0; n < def->nsounds; n++)
|
||||
if (virDomainSoundDefFormat(buf, def->sounds[n], flags) < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user