The function always returns succes so there's no need for a return value. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- 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 == VIR_SECRET_LOOKUP_TYPE_USAGE) { dst->u.usage = 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 = g_strdup(src->secrettype); authdef->authType = src->authType; - if (virSecretLookupDefCopy(&authdef->seclookupdef, &src->seclookupdef) < 0) - return NULL; + virSecretLookupDefCopy(&authdef->seclookupdef, &src->seclookupdef); return g_steal_pointer(&authdef); } -- 2.24.1