From cebf33cdcedde158d3977cc14d42017450ac6b7a Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Sat, 19 Dec 2015 17:52:30 +0100 Subject: [PATCH] add some const --- src/ciphers/camellia.c | 2 +- src/misc/base64/base64_encode.c | 4 ++-- src/misc/error_to_string.c | 2 +- src/pk/asn1/der/utctime/der_encode_utctime.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ciphers/camellia.c b/src/ciphers/camellia.c index e791051..ad8f501 100644 --- a/src/ciphers/camellia.c +++ b/src/ciphers/camellia.c @@ -171,7 +171,7 @@ static const ulong32 SP4404[] = { 0x28280028, 0x7b7b007b, 0xc9c900c9, 0xc1c100c1, 0xe3e300e3, 0xf4f400f4, 0xc7c700c7, 0x9e9e009e, }; -static ulong64 key_sigma[] = { +static const ulong64 key_sigma[] = { CONST64(0xA09E667F3BCC908B), CONST64(0xB67AE8584CAA73B2), CONST64(0xC6EF372FE94F82BE), diff --git a/src/misc/base64/base64_encode.c b/src/misc/base64/base64_encode.c index 0e1a7c1..0ed0aa3 100644 --- a/src/misc/base64/base64_encode.c +++ b/src/misc/base64/base64_encode.c @@ -20,12 +20,12 @@ #if defined(LTC_BASE64) || defined (LTC_BASE64_URL) #if defined(LTC_BASE64) -static const char *codes_base64 = +static const char * const codes_base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; #endif /* LTC_BASE64 */ #if defined(LTC_BASE64_URL) -static const char *codes_base64url = +static const char * const codes_base64url = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; #endif /* LTC_BASE64_URL */ diff --git a/src/misc/error_to_string.c b/src/misc/error_to_string.c index 19f8781..7ebd898 100644 --- a/src/misc/error_to_string.c +++ b/src/misc/error_to_string.c @@ -16,7 +16,7 @@ Convert error codes to ASCII strings, Tom St Denis */ -static const char *err_2_str[] = +static const char * const err_2_str[] = { "CRYPT_OK", "CRYPT_ERROR", diff --git a/src/pk/asn1/der/utctime/der_encode_utctime.c b/src/pk/asn1/der/utctime/der_encode_utctime.c index f8d0c56..0dcac8a 100644 --- a/src/pk/asn1/der/utctime/der_encode_utctime.c +++ b/src/pk/asn1/der/utctime/der_encode_utctime.c @@ -17,7 +17,7 @@ #ifdef LTC_DER -static const char *baseten = "0123456789"; +static const char * const baseten = "0123456789"; #define STORE_V(y) \ out[x++] = der_ia5_char_encode(baseten[(y/10) % 10]); \