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