[libvirt] [PATCH] Remove pointless check for !ret in virDomainNetDefCoalesceParseXML

Martin Kletzander posted 1 patch 6 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/b2763f189c5b306a685021b4fede9e2cee8528de.1492879148.git.mkletzan@redhat.com
src/conf/domain_conf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] Remove pointless check for !ret in virDomainNetDefCoalesceParseXML
Posted by Martin Kletzander 6 years, 11 months ago
It was left there after removing a macro it was part of in first
version or so.  Now it will always be NULL.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
---
Pushed as trivial

 src/conf/domain_conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 4a777d67bfad..7d3cf178eaf6 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -6789,7 +6789,7 @@ virDomainNetDefCoalesceParseXML(xmlNodePtr node,
     if (!str)
         goto cleanup;

-    if (!ret && VIR_ALLOC(ret) < 0)
+    if (VIR_ALLOC(ret) < 0)
         goto cleanup;

     if (virStrToLong_ullp(str, NULL, 10, &tmp) < 0) {
--
2.12.2

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