mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
conf: reduce indentation in virDomainDefAddImplicitVideo
Return early if there is nothing to do.
This commit is contained in:
parent
35e3c4a684
commit
1485be1784
@ -18650,7 +18650,9 @@ virDomainDefAddImplicitVideo(virDomainDefPtr def)
|
||||
|
||||
/* For backwards compatibility, if no <video> tag is set but there
|
||||
* is a <graphics> tag, then we add a single video tag */
|
||||
if (def->ngraphics && !def->nvideos) {
|
||||
if (def->ngraphics == 0 || def->nvideos > 0)
|
||||
return 0;
|
||||
|
||||
if (VIR_ALLOC(video) < 0)
|
||||
goto cleanup;
|
||||
video->type = virDomainVideoDefaultType(def);
|
||||
@ -18665,7 +18667,6 @@ virDomainDefAddImplicitVideo(virDomainDefPtr def)
|
||||
goto cleanup;
|
||||
def->videos[def->nvideos++] = video;
|
||||
video = NULL;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
|
Loading…
Reference in New Issue
Block a user