]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
xenconfig: Remove pointless label in xenParseSxprSound
authorPeter Krempa <pkrempa@redhat.com>
Wed, 3 Jul 2019 06:41:38 +0000 (08:41 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 9 Jul 2019 08:27:19 +0000 (10:27 +0200)
The 'error' label just returned -1. Inline it.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/xenconfig/xen_sxpr.c

index 4328875475b2c210fdeb5db1b77cc162372d0777..7404aac071028b4a86c69a6d4b3203e7163acd42 100644 (file)
@@ -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;
 }