[PATCH] change return type of virURIParamAppend() to void type

Ani Sinha ani at anisinha.ca
Thu Jan 6 17:07:55 UTC 2022


virURIParamAppend() unconditionally returns 0. Simplify and make the return type
as void type.

Signed-off-by: Ani Sinha <ani at anisinha.ca>
---
 src/util/viruri.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/util/viruri.c b/src/util/viruri.c
index 3c73188a55..88bb0cc1f8 100644
--- a/src/util/viruri.c
+++ b/src/util/viruri.c
@@ -34,7 +34,7 @@
 
 VIR_LOG_INIT("util.uri");
 
-static int
+static void
 virURIParamAppend(virURI *uri,
                   const char *name,
                   const char *value)
@@ -52,7 +52,7 @@ virURIParamAppend(virURI *uri,
     uri->params[uri->paramsCount].ignore = false;
     uri->paramsCount++;
 
-    return 0;
+    return;
 }
 
 
@@ -113,8 +113,7 @@ virURIParseParams(virURI *uri)
         }
 
         /* Append to the parameter set. */
-        if (virURIParamAppend(uri, name, NULLSTR_EMPTY(value)) < 0)
-            return -1;
+        virURIParamAppend(uri, name, NULLSTR_EMPTY(value));
 
     next:
         query = end;
-- 
2.25.1




More information about the libvir-list mailing list