[libvirt PATCH 01/10] virXMLPropEnum: Fix return value

Tim Wiederhake posted 10 patches 4 years, 9 months ago
There is a newer version of this series
[libvirt PATCH 01/10] virXMLPropEnum: Fix return value
Posted by Tim Wiederhake 4 years, 9 months ago
Function incorrectly returns 0 when property was successfully read.

Fixes: ab5d2776c925ec45eb54ec5432f5645cebb80c85
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
---
 src/util/virxml.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/virxml.c b/src/util/virxml.c
index b79050db35..01c0114072 100644
--- a/src/util/virxml.c
+++ b/src/util/virxml.c
@@ -856,7 +856,7 @@ virXMLPropEnum(xmlNodePtr node,
     }
 
     *result = ret;
-    return 0;
+    return 1;
 }
 
 /**
-- 
2.26.3

Re: [libvirt PATCH 01/10] virXMLPropEnum: Fix return value
Posted by Ján Tomko 4 years, 9 months ago
On a Friday in 2021, Tim Wiederhake wrote:
>Function incorrectly returns 0 when property was successfully read.
>
>Fixes: ab5d2776c925ec45eb54ec5432f5645cebb80c85
>Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
>---
> src/util/virxml.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

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

Jano