From nobody Mon Feb 9 01:42:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1584636515; cv=none; d=zohomail.com; s=zohoarc; b=FEdNGLJeISgcTTtTLtSDx/hbFK6X3HCdIesW3APqvTvWeBGEA8iRZ5daYZE/qcRxgNtExvwAPoyXsoTun+pOhHI03BFi2fROYVOSHTSNlgmYqwGTfqvxI8eEN5HqJggZQuMRHSDCesE0dJLJFL2uLdGSopmWfW2vCHz3jAcrhTQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584636515; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=fZiioaGqMoSnwPFtG4aZVHr6Wmqk/spi7P3Jri/FnDo=; b=EykBPcLzSKoglm0cw7s1n7M5SupAZ6WPDKSzOY40XaSVazzaWvRGfd34mqOTvSCE/zkmjH4tVMKDZRdfhTPf9bh3V2jjVE3GORlhUsQQfN3jF6hks3atPUulhThqcydT/fOba5Rri6O5LU0QvDCE/9Of7nFIRMZRPzoeodIZ+5w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 1584636515630186.33342864130668; Thu, 19 Mar 2020 09:48:35 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-78-5pBVfDp_NrCwUgrE75BTDw-1; Thu, 19 Mar 2020 12:48:31 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8501219251A4; Thu, 19 Mar 2020 16:48:23 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 53B755417F; Thu, 19 Mar 2020 16:48:23 +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 DC21594291; Thu, 19 Mar 2020 16:48:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02JGmDG5015899 for ; Thu, 19 Mar 2020 12:48:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2AB09BBBCF; Thu, 19 Mar 2020 16:48:13 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id A40105C1A7 for ; Thu, 19 Mar 2020 16:48:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584636514; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=fZiioaGqMoSnwPFtG4aZVHr6Wmqk/spi7P3Jri/FnDo=; b=ABHvo3dm/eTwMzDOcKh/0eK1eaG2fklDZUeuJfFUfJDGN1QBHvXAkJLoLFNkxnWNhS0pFq 0DffnKdNSa/XyQcs0bk//loDqzauXku7XJoyXHIba3ZlZ4The4OyKBMKREE4l6Pha/8f8n yH+TppOX1XNVRz/j10tnClKRF7DyxJQ= X-MC-Unique: 5pBVfDp_NrCwUgrE75BTDw-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/2] virSecretLookupDefCopy: Remove return value Date: Thu, 19 Mar 2020 17:48:07 +0100 Message-Id: <6262a724b800456d57c7e2da9b512657c97a5016.1584636370.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com 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.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The function always returns succes so there's no need for a return value. Signed-off-by: Peter Krempa --- src/util/virsecret.c | 3 +-- src/util/virsecret.h | 4 ++-- src/util/virstoragefile.c | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/util/virsecret.c b/src/util/virsecret.c index f44d964198..54d6bbcb7c 100644 --- a/src/util/virsecret.c +++ b/src/util/virsecret.c @@ -48,7 +48,7 @@ virSecretLookupDefClear(virSecretLookupTypeDefPtr def) } -int +void virSecretLookupDefCopy(virSecretLookupTypeDefPtr dst, const virSecretLookupTypeDef *src) { @@ -58,7 +58,6 @@ virSecretLookupDefCopy(virSecretLookupTypeDefPtr dst, } else if (dst->type =3D=3D VIR_SECRET_LOOKUP_TYPE_USAGE) { dst->u.usage =3D g_strdup(src->u.usage); } - return 0; } diff --git a/src/util/virsecret.h b/src/util/virsecret.h index 8c49cfbc89..cfdf2b6e29 100644 --- a/src/util/virsecret.h +++ b/src/util/virsecret.h @@ -48,8 +48,8 @@ struct _virSecretLookupTypeDef { }; void virSecretLookupDefClear(virSecretLookupTypeDefPtr def); -int virSecretLookupDefCopy(virSecretLookupTypeDefPtr dst, - const virSecretLookupTypeDef *src); +void virSecretLookupDefCopy(virSecretLookupTypeDefPtr dst, + const virSecretLookupTypeDef *src); int virSecretLookupParseSecret(xmlNodePtr secretnode, virSecretLookupTypeDefPtr def); void virSecretLookupFormatSecret(virBufferPtr buf, diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 870c40f446..e723cc9410 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -1792,8 +1792,7 @@ virStorageAuthDefCopy(const virStorageAuthDef *src) authdef->secrettype =3D g_strdup(src->secrettype); authdef->authType =3D src->authType; - if (virSecretLookupDefCopy(&authdef->seclookupdef, &src->seclookupdef)= < 0) - return NULL; + virSecretLookupDefCopy(&authdef->seclookupdef, &src->seclookupdef); return g_steal_pointer(&authdef); } --=20 2.24.1