[PATCH 1/3] cipher: constify spec arrays

Jussi Kivilinna jussi.kivilinna at iki.fi
Sat Jan 20 21:04:45 CET 2018


* cipher/cipher.c (cipher_list): Constify array.
* cipher/mac.c (mac_list): Constify array.
* cipher/md.c (digest_list): Constify array.
* cipher/pubkey.c (pubkey_list): Constify array.
--

Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
---
 0 files changed

diff --git a/cipher/cipher.c b/cipher/cipher.c
index 063c13dab..18b25911a 100644
--- a/cipher/cipher.c
+++ b/cipher/cipher.c
@@ -33,7 +33,7 @@
 
 /* This is the list of the default ciphers, which are included in
    libgcrypt.  */
-static gcry_cipher_spec_t *cipher_list[] =
+static gcry_cipher_spec_t * const cipher_list[] =
   {
 #if USE_BLOWFISH
      &_gcry_cipher_spec_blowfish,
diff --git a/cipher/mac.c b/cipher/mac.c
index 46be7b7b9..4a7a47df2 100644
--- a/cipher/mac.c
+++ b/cipher/mac.c
@@ -29,7 +29,7 @@
 
 /* This is the list of the digest implementations included in
    libgcrypt.  */
-static gcry_mac_spec_t *mac_list[] = {
+static gcry_mac_spec_t * const mac_list[] = {
 #if USE_SHA1
   &_gcry_mac_type_spec_hmac_sha1,
 #endif
diff --git a/cipher/md.c b/cipher/md.c
index 94f1b5d64..efbffe18e 100644
--- a/cipher/md.c
+++ b/cipher/md.c
@@ -31,7 +31,7 @@
 
 /* This is the list of the digest implementations included in
    libgcrypt.  */
-static gcry_md_spec_t *digest_list[] =
+static gcry_md_spec_t * const digest_list[] =
   {
 #if USE_CRC
      &_gcry_digest_spec_crc32,
diff --git a/cipher/pubkey.c b/cipher/pubkey.c
index 8ec15fd41..4c07e33bf 100644
--- a/cipher/pubkey.c
+++ b/cipher/pubkey.c
@@ -34,7 +34,7 @@
 
 /* This is the list of the public-key algorithms included in
    Libgcrypt.  */
-static gcry_pk_spec_t *pubkey_list[] =
+static gcry_pk_spec_t * const pubkey_list[] =
   {
 #if USE_ECC
     &_gcry_pubkey_spec_ecc,




More information about the Gcrypt-devel mailing list