mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
xenconfig: Remove pointless label in xenParseSxprSound
The 'error' label just returned -1. Inline it. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
48a0924740
commit
4fbecf4432
@ -303,13 +303,13 @@ xenParseSxprSound(virDomainDefPtr def,
|
||||
|
||||
if (VIR_ALLOC_N(def->sounds,
|
||||
VIR_DOMAIN_SOUND_MODEL_ES1370 + 1) < 0)
|
||||
goto error;
|
||||
return -1;
|
||||
|
||||
|
||||
for (i = 0; i < (VIR_DOMAIN_SOUND_MODEL_ES1370 + 1); i++) {
|
||||
virDomainSoundDefPtr sound;
|
||||
if (VIR_ALLOC(sound) < 0)
|
||||
goto error;
|
||||
return -1;
|
||||
sound->model = i;
|
||||
def->sounds[def->nsounds++] = sound;
|
||||
}
|
||||
@ -329,20 +329,20 @@ xenParseSxprSound(virDomainDefPtr def,
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Sound model %s too big for destination"),
|
||||
offset);
|
||||
goto error;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (VIR_ALLOC(sound) < 0)
|
||||
goto error;
|
||||
return -1;
|
||||
|
||||
if ((sound->model = virDomainSoundModelTypeFromString(model)) < 0) {
|
||||
VIR_FREE(sound);
|
||||
goto error;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (VIR_APPEND_ELEMENT(def->sounds, def->nsounds, sound) < 0) {
|
||||
virDomainSoundDefFree(sound);
|
||||
goto error;
|
||||
return -1;
|
||||
}
|
||||
|
||||
offset = offset2 ? offset2 + 1 : NULL;
|
||||
@ -350,7 +350,4 @@ xenParseSxprSound(virDomainDefPtr def,
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user