[libvirt] [PATCH 27/38] qemu: hotplug: Allow passing in NULL 'tlsAlias' to qemuDomainGetTLSObjects

Peter Krempa posted 38 patches 6 years, 11 months ago
[libvirt] [PATCH 27/38] qemu: hotplug: Allow passing in NULL 'tlsAlias' to qemuDomainGetTLSObjects
Posted by Peter Krempa 6 years, 11 months ago
Some callers will not need to generate the alias again.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 src/qemu/qemu_hotplug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 8cfb81d545..f52e0c773d 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1523,7 +1523,8 @@ qemuDomainGetTLSObjects(virQEMUCapsPtr qemuCaps,
                                      tlsProps) < 0)
         return -1;

-    if (!(*tlsAlias = qemuAliasTLSObjFromSrcAlias(srcAlias)))
+    if (tlsAlias &&
+        !(*tlsAlias = qemuAliasTLSObjFromSrcAlias(srcAlias)))
         return -1;

     return 0;
-- 
2.16.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 27/38] qemu: hotplug: Allow passing in NULL 'tlsAlias' to qemuDomainGetTLSObjects
Posted by Ján Tomko 6 years, 11 months ago
On Wed, May 30, 2018 at 02:41:23PM +0200, Peter Krempa wrote:
>Some callers will not need to generate the alias again.
>
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> src/qemu/qemu_hotplug.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

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