Skip to content

Commit

Permalink
Fix Coverity reported issues on older functions
Browse files Browse the repository at this point in the history
Coverity decided to start investigating unused functions now ...

Signed-off-by: Simo Sorce <[email protected]>
  • Loading branch information
simo5 committed Sep 5, 2024
1 parent f4cd8b7 commit 8757cf2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -814,21 +814,21 @@ 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)
{
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)
Expand Down
4 changes: 2 additions & 2 deletions src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8757cf2

Please sign in to comment.