summaryrefslogtreecommitdiff
path: root/p11-kit
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2013-07-17 12:55:57 +0200
committerStef Walter <stef@thewalter.net>2013-07-18 13:04:37 +0200
commite403f7b33ac35e961c72ed1b6335bbe3084e4642 (patch)
treebb9e89ab69bae17d3ab28c3a61729ad65435407c /p11-kit
parent52a84b84a924a9f1cd8090b0a47b9f7d00ca69f3 (diff)
Declare static variables const where it makes sense
https://bugzilla.redhat.com/show_bug.cgi?id=985337
Diffstat (limited to 'p11-kit')
-rw-r--r--p11-kit/conf.c4
-rw-r--r--p11-kit/uri.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/p11-kit/conf.c b/p11-kit/conf.c
index d29d9ec..83ee7ca 100644
--- a/p11-kit/conf.c
+++ b/p11-kit/conf.c
@@ -288,8 +288,8 @@ static char *
calc_name_from_filename (const char *fname)
{
/* We eventually want to settle on .module */
- static const char *suffix = ".module";
- static size_t suffix_len = 7;
+ static const char const *suffix = ".module";
+ static const size_t suffix_len = 7;
const char *c = fname;
size_t fname_len;
size_t name_len;
diff --git a/p11-kit/uri.c b/p11-kit/uri.c
index df069f4..a60974c 100644
--- a/p11-kit/uri.c
+++ b/p11-kit/uri.c
@@ -415,14 +415,14 @@ p11_kit_uri_clear_attribute (P11KitUri *uri, CK_ATTRIBUTE_TYPE attr_type)
CK_ATTRIBUTE_PTR
p11_kit_uri_get_attributes (P11KitUri *uri, CK_ULONG_PTR n_attrs)
{
- static CK_ATTRIBUTE empty = { CKA_INVALID, NULL, 0UL };
+ static const CK_ATTRIBUTE terminator = { CKA_INVALID, NULL, 0UL };
return_val_if_fail (uri != NULL, NULL);
if (!uri->attrs) {
if (n_attrs)
*n_attrs = 0;
- return &empty;
+ return (CK_ATTRIBUTE_PTR)&terminator;
}
if (n_attrs)