]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: turn virDomainMemtuneFormat void
authorPeter Krempa <pkrempa@redhat.com>
Wed, 30 Oct 2019 11:09:34 +0000 (12:09 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 12 Nov 2019 13:37:59 +0000 (14:37 +0100)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_conf.c

index 0e774889a2b8f8dedacd99cf05feb490349716b4..81ab5eb138e50b2a753c7e72a832554e68a6e6dc 100644 (file)
@@ -27953,12 +27953,11 @@ virDomainIOMMUDefFormat(virBufferPtr buf,
 }
 
 
-static int
+static void
 virDomainMemtuneFormat(virBufferPtr buf,
                        const virDomainMemtune *mem)
 {
     g_auto(virBuffer) childBuf = VIR_BUFFER_INITIALIZER;
-    int ret = -1;
 
     virBufferSetChildIndent(&childBuf, buf);
 
@@ -27984,9 +27983,6 @@ virDomainMemtuneFormat(virBufferPtr buf,
     }
 
     virXMLFormatElement(buf, "memtune", NULL, &childBuf);
-
-    ret = 0;
-    return ret;
 }
 
 
@@ -28489,9 +28485,7 @@ virDomainDefFormatInternalSetRootName(virDomainDefPtr def,
     if (virDomainDefFormatBlkiotune(buf, def) < 0)
         goto error;
 
-    if (virDomainMemtuneFormat(buf, &def->mem) < 0)
-        goto error;
-
+    virDomainMemtuneFormat(buf, &def->mem);
     virDomainMemorybackingFormat(buf, &def->mem);
 
     if (virDomainCpuDefFormat(buf, def) < 0)