From f4061f5fe67c6252d80dbbe94749f0581c764cfc Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Thu, 5 Sep 2024 08:37:27 -0400 Subject: [PATCH] Fix Coverity reported issues on older functions Coverity decided to start investigating unused functions now ... Signed-off-by: Simo Sorce --- src/util.c | 8 ++++---- src/util.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/util.c b/src/util.c index a6140f8f..273c2bbd 100644 --- a/src/util.c +++ b/src/util.c @@ -814,10 +814,10 @@ CK_ATTRIBUTE p11prov_uri_get_id(P11PROV_URI *uri) return uri->id; } -void p11prov_uri_set_id(P11PROV_URI *uri, CK_ATTRIBUTE *id) +CK_RV p11prov_uri_set_id(P11PROV_URI *uri, CK_ATTRIBUTE *id) { OPENSSL_free(uri->id.pValue); - p11prov_copy_attr(&uri->id, id); + return p11prov_copy_attr(&uri->id, id); } CK_ATTRIBUTE p11prov_uri_get_label(P11PROV_URI *uri) @@ -825,10 +825,10 @@ CK_ATTRIBUTE p11prov_uri_get_label(P11PROV_URI *uri) return uri->object; } -void p11prov_uri_set_label(P11PROV_URI *uri, CK_ATTRIBUTE *label) +CK_RV p11prov_uri_set_label(P11PROV_URI *uri, CK_ATTRIBUTE *label) { OPENSSL_free(uri->object.pValue); - p11prov_copy_attr(&uri->object, label); + return p11prov_copy_attr(&uri->object, label); } char *p11prov_uri_get_serial(P11PROV_URI *uri) diff --git a/src/util.h b/src/util.h index 1b24666b..aef8f4a4 100644 --- a/src/util.h +++ b/src/util.h @@ -59,9 +59,9 @@ void p11prov_uri_free(P11PROV_URI *parsed_uri); CK_OBJECT_CLASS p11prov_uri_get_class(P11PROV_URI *uri); void p11prov_uri_set_class(P11PROV_URI *uri, CK_OBJECT_CLASS class); CK_ATTRIBUTE p11prov_uri_get_id(P11PROV_URI *uri); -void p11prov_uri_set_id(P11PROV_URI *uri, CK_ATTRIBUTE *id); +CK_RV p11prov_uri_set_id(P11PROV_URI *uri, CK_ATTRIBUTE *id); CK_ATTRIBUTE p11prov_uri_get_label(P11PROV_URI *uri); -void p11prov_uri_set_label(P11PROV_URI *uri, CK_ATTRIBUTE *label); +CK_RV p11prov_uri_set_label(P11PROV_URI *uri, CK_ATTRIBUTE *label); char *p11prov_uri_get_serial(P11PROV_URI *uri); char *p11prov_uri_get_pin(P11PROV_URI *uri); CK_SLOT_ID p11prov_uri_get_slot_id(P11PROV_URI *uri);