]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: only return two values in virQEMUDriverConfigLoadMemoryEntry
authorJán Tomko <jtomko@redhat.com>
Mon, 18 May 2020 13:23:46 +0000 (15:23 +0200)
committerJán Tomko <jtomko@redhat.com>
Wed, 20 May 2020 12:47:56 +0000 (14:47 +0200)
The intention of these split Load*Entry functions is to prevent
virQEMUDriverConfigLoadFile from getting too large.

There's no need to signal to the caller whether an entry was found
or not, only whether there was an error.

Remove the non-standard return 1.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
src/qemu/qemu_conf.c

index 2d4e2a46f32fbcd9662e124a99c394e463a5b319..b49299e1dec779937399ae42f1fe85b707088b02 100644 (file)
@@ -977,7 +977,7 @@ virQEMUDriverConfigLoadMemoryEntry(virQEMUDriverConfigPtr cfg,
     } else if (rc > 0) {
         VIR_FREE(cfg->memoryBackingDir);
         cfg->memoryBackingDir = g_strdup_printf("%s/libvirt/qemu", dir);
-        return 1;
+        return 0;
     }
 
     return 0;