From nobody Thu May 2 05:11:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1641488908437132.9965922798532; Thu, 6 Jan 2022 09:08:28 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-401-hyeEfvLHPNalXCgqlAC0cg-1; Thu, 06 Jan 2022 12:08:25 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7B8A185B663; Thu, 6 Jan 2022 17:08:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D34167A408; Thu, 6 Jan 2022 17:08:18 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EEA3D1806D1C; Thu, 6 Jan 2022 17:08:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 206H8FCR006962 for ; Thu, 6 Jan 2022 12:08:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id 5092C53C6; Thu, 6 Jan 2022 17:08:15 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4B3D753D8 for ; Thu, 6 Jan 2022 17:08:08 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B84431064E6C for ; Thu, 6 Jan 2022 17:08:08 +0000 (UTC) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-612-ZNALEQpuOLSwOhqaVr-qAA-1; Thu, 06 Jan 2022 12:08:05 -0500 Received: by mail-pg1-f169.google.com with SMTP id g22so3133760pgn.1 for ; Thu, 06 Jan 2022 09:08:05 -0800 (PST) Received: from anisinha-lenovo.ba.nuagenetworks.net ([115.96.196.144]) by smtp.googlemail.com with ESMTPSA id g12sm3238958pfv.136.2022.01.06.09.08.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 09:08:03 -0800 (PST) X-MC-Unique: hyeEfvLHPNalXCgqlAC0cg-1 X-MC-Unique: ZNALEQpuOLSwOhqaVr-qAA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=t7OC8Q2nSrEinfgvJYHRAI2OQGSauAP2WnLH1VqacZg=; b=PtMnCPEs0KlyZQHVVIqx0oyTr6UjbGAExkcznl7u96Af3w6x+kasNoY/dvznVVxKnj AzAkvhIxaB72EgsUhSTuR6Q5sV5K5XpM2QRcYbTrRHbqvVZCbA1tdOxzKegy21M1DgcY zLxe20FFEAcpZtxvaMUl5O8kp0Q9zalXJLoq58bqmtYyKM4X61pKZ+4oCvZ5GZV95Si0 Vn2h/OHp6ASLmxSSTSle/fmJ8Dt7QwcBOm2frWoViRVVph6nyYccCIFLYOrn4pqaZdcI fbR51koriCqj+L0JJyWGCsKx0Z4OW1HEsRLSlezgjSsHjVZAkyXOwe6l5vSmTV0xwj0b p9FA== X-Gm-Message-State: AOAM532TjEV811vJvidLVnpldr6s/WmZtEWEnhG6MKruEwhzj6jU2ywc 8tbBrRE47kjIZwNSX+7zGh8L/6d+B0FYTXBm X-Google-Smtp-Source: ABdhPJxBupAmLmnWrp4YmsQVDdwnMQEmMZtoZbmb08KJlIWtIATQsM26AJPnBFKMB9i2Lq6W1ALbJQ== X-Received: by 2002:a63:2b4a:: with SMTP id r71mr53850311pgr.57.1641488883721; Thu, 06 Jan 2022 09:08:03 -0800 (PST) From: Ani Sinha To: libvir-list@redhat.com Subject: [PATCH] change return type of virURIParamAppend() to void type Date: Thu, 6 Jan 2022 22:37:55 +0530 Message-Id: <20220106170755.185764-1-ani@anisinha.ca> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Ani Sinha X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1641488910765100001 Content-Type: text/plain; charset="utf-8" virURIParamAppend() unconditionally returns 0. Simplify and make the return= type as void type. Signed-off-by: Ani Sinha Reviewed-by: J=C3=A1n Tomko --- 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 @@ =20 VIR_LOG_INIT("util.uri"); =20 -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 =3D false; uri->paramsCount++; =20 - return 0; + return; } =20 =20 @@ -113,8 +113,7 @@ virURIParseParams(virURI *uri) } =20 /* Append to the parameter set. */ - if (virURIParamAppend(uri, name, NULLSTR_EMPTY(value)) < 0) - return -1; + virURIParamAppend(uri, name, NULLSTR_EMPTY(value)); =20 next: query =3D end; --=20 2.25.1