From e403f7b33ac35e961c72ed1b6335bbe3084e4642 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Wed, 17 Jul 2013 12:55:57 +0200 Subject: Declare static variables const where it makes sense https://bugzilla.redhat.com/show_bug.cgi?id=985337 --- p11-kit/conf.c | 4 ++-- p11-kit/uri.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'p11-kit') 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 ∅ + return (CK_ATTRIBUTE_PTR)&terminator; } if (n_attrs) -- cgit v1.1