[libvirt] [PATCH v2 02/15] qemu: Move 'done' label in qemuBuildControllerDevStr()

Andrea Bolognani posted 15 patches 7 years, 2 months ago
There is a newer version of this series
[libvirt] [PATCH v2 02/15] qemu: Move 'done' label in qemuBuildControllerDevStr()
Posted by Andrea Bolognani 7 years, 2 months ago
Even when we skip part of the processing, we still want error
checking on the buffer.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 src/qemu/qemu_command.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 55e573b61..1ab5b0818 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -2801,10 +2801,10 @@ qemuBuildControllerDevStr(const virDomainDef *domainDef,
     if (qemuBuildDeviceAddressStr(&buf, domainDef, &def->info, qemuCaps) < 0)
         goto error;
 
+ done:
     if (virBufferCheckError(&buf) < 0)
         goto error;
 
- done:
     *devstr = virBufferContentAndReset(&buf);
     return 0;
 
-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2 02/15] qemu: Move 'done' label in qemuBuildControllerDevStr()
Posted by Peter Krempa 7 years, 2 months ago
On Fri, Feb 16, 2018 at 17:27:59 +0100, Andrea Bolognani wrote:
> Even when we skip part of the processing, we still want error
> checking on the buffer.
> 
> Signed-off-by: Andrea Bolognani <abologna@redhat.com>
> ---
>  src/qemu/qemu_command.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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