a41c76
From c671c037d06c761708374dba1b7e4ed4041fe9fb Mon Sep 17 00:00:00 2001
a41c76
Message-Id: <c671c037d06c761708374dba1b7e4ed4041fe9fb@dist-git>
a41c76
From: Peter Krempa <pkrempa@redhat.com>
a41c76
Date: Fri, 20 Mar 2020 10:28:51 +0100
a41c76
Subject: [PATCH] virSecretLookupDefCopy: Remove return value
a41c76
MIME-Version: 1.0
a41c76
Content-Type: text/plain; charset=UTF-8
a41c76
Content-Transfer-Encoding: 8bit
a41c76
a41c76
The function always returns succes so there's no need for a return
a41c76
value.
a41c76
a41c76
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
a41c76
Reviewed-by: Ján Tomko <jtomko@redhat.com>
a41c76
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
a41c76
(cherry picked from commit 02f909b8a6ad8c271693fed9ceab606f0dda2294)
a41c76
a41c76
https://bugzilla.redhat.com/show_bug.cgi?id=1814923
a41c76
Message-Id: <a2f47ac4171ea9eaf3fbee12f22670ff10a1b98c.1584696274.git.pkrempa@redhat.com>
a41c76
Reviewed-by: Ján Tomko <jtomko@redhat.com>
a41c76
---
a41c76
 src/util/virsecret.c      | 3 +--
a41c76
 src/util/virsecret.h      | 4 ++--
a41c76
 src/util/virstoragefile.c | 3 +--
a41c76
 3 files changed, 4 insertions(+), 6 deletions(-)
a41c76
a41c76
diff --git a/src/util/virsecret.c b/src/util/virsecret.c
a41c76
index 174ce544c0..167ad24fdf 100644
a41c76
--- a/src/util/virsecret.c
a41c76
+++ b/src/util/virsecret.c
a41c76
@@ -47,7 +47,7 @@ virSecretLookupDefClear(virSecretLookupTypeDefPtr def)
a41c76
 }
a41c76
 
a41c76
 
a41c76
-int
a41c76
+void
a41c76
 virSecretLookupDefCopy(virSecretLookupTypeDefPtr dst,
a41c76
                        const virSecretLookupTypeDef *src)
a41c76
 {
a41c76
@@ -57,7 +57,6 @@ virSecretLookupDefCopy(virSecretLookupTypeDefPtr dst,
a41c76
     } else if (dst->type == VIR_SECRET_LOOKUP_TYPE_USAGE) {
a41c76
         dst->u.usage = g_strdup(src->u.usage);
a41c76
     }
a41c76
-    return 0;
a41c76
 }
a41c76
 
a41c76
 
a41c76
diff --git a/src/util/virsecret.h b/src/util/virsecret.h
a41c76
index 8bc8a24e0f..780b5761f4 100644
a41c76
--- a/src/util/virsecret.h
a41c76
+++ b/src/util/virsecret.h
a41c76
@@ -49,8 +49,8 @@ struct _virSecretLookupTypeDef {
a41c76
 };
a41c76
 
a41c76
 void virSecretLookupDefClear(virSecretLookupTypeDefPtr def);
a41c76
-int virSecretLookupDefCopy(virSecretLookupTypeDefPtr dst,
a41c76
-                           const virSecretLookupTypeDef *src);
a41c76
+void virSecretLookupDefCopy(virSecretLookupTypeDefPtr dst,
a41c76
+                            const virSecretLookupTypeDef *src);
a41c76
 int virSecretLookupParseSecret(xmlNodePtr secretnode,
a41c76
                                virSecretLookupTypeDefPtr def);
a41c76
 void virSecretLookupFormatSecret(virBufferPtr buf,
a41c76
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
a41c76
index ce126f5cba..fa37840532 100644
a41c76
--- a/src/util/virstoragefile.c
a41c76
+++ b/src/util/virstoragefile.c
a41c76
@@ -1792,8 +1792,7 @@ virStorageAuthDefCopy(const virStorageAuthDef *src)
a41c76
     authdef->secrettype = g_strdup(src->secrettype);
a41c76
     authdef->authType = src->authType;
a41c76
 
a41c76
-    if (virSecretLookupDefCopy(&authdef->seclookupdef, &src->seclookupdef) < 0)
a41c76
-        return NULL;
a41c76
+    virSecretLookupDefCopy(&authdef->seclookupdef, &src->seclookupdef);
a41c76
 
a41c76
     return g_steal_pointer(&authdef);
a41c76
 }
a41c76
-- 
a41c76
2.25.1
a41c76