[PATCH 2/4] qemu: command: Don't bother reporting errors in smbios formatters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



qemuBuildSmbiosBiosStr and qemuBuildSmbiosSystemStr return NULL if
there's noting to format on the commandline. Reporting errors from
buffer creation doesn't make sense since it would be ignored.
---
 src/qemu/qemu_command.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 13c2cde..11ae363 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -5717,14 +5717,7 @@ qemuBuildSmbiosBiosStr(virSysinfoBIOSDefPtr def)
     if (def->release)
         virBufferAsprintf(&buf, ",release=%s", def->release);

-    if (virBufferCheckError(&buf) < 0)
-        goto error;
-
     return virBufferContentAndReset(&buf);
-
- error:
-    virBufferFreeAndReset(&buf);
-    return NULL;
 }


@@ -5765,14 +5758,7 @@ qemuBuildSmbiosSystemStr(virSysinfoSystemDefPtr def,
     if (def->family)
         virBufferAsprintf(&buf, ",family=%s", def->family);

-    if (virBufferCheckError(&buf) < 0)
-        goto error;
-
     return virBufferContentAndReset(&buf);
-
- error:
-    virBufferFreeAndReset(&buf);
-    return NULL;
 }


-- 
2.10.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]