]> xenbits.xensource.com Git - libvirt.git/commitdiff
change return type of virURIParamAppend() to void type
authorAni Sinha <ani@anisinha.ca>
Thu, 6 Jan 2022 17:07:55 +0000 (22:37 +0530)
committerJán Tomko <jtomko@redhat.com>
Fri, 7 Jan 2022 07:07:04 +0000 (08:07 +0100)
virURIParamAppend() unconditionally returns 0. Simplify and make the return type
as void type.

Signed-off-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/util/viruri.c

index 3c73188a55374cd9e857ff8080cc118bf3549f94..88bb0cc1f8c58d20462c46b995131a5debcce7c3 100644 (file)
@@ -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;