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

2022-01-06 Thread Ján Tomko

On a Thursday in 2022, Ani Sinha wrote:

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

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



Reviewed-by: Ján Tomko 
and pushed

Jano


signature.asc
Description: PGP signature


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

2022-01-06 Thread Ani Sinha
virURIParamAppend() unconditionally returns 0. Simplify and make the return type
as void type.

Signed-off-by: Ani Sinha 
---
 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