From 2108bdcdb5377422f8b9123c2a51619660ab60c0 Mon Sep 17 00:00:00 2001 From: Thom Wiggers Date: Thu, 18 Jul 2019 13:42:37 +0200 Subject: [PATCH] Make a static global explicitly const --- crypto_kem/frodokem1344aes/clean/noise.c | 2 +- crypto_kem/frodokem1344aes/opt/noise.c | 2 +- crypto_kem/frodokem1344shake/clean/noise.c | 2 +- crypto_kem/frodokem1344shake/opt/noise.c | 2 +- crypto_kem/frodokem640aes/clean/noise.c | 2 +- crypto_kem/frodokem640aes/opt/noise.c | 2 +- crypto_kem/frodokem640shake/clean/noise.c | 2 +- crypto_kem/frodokem640shake/opt/noise.c | 2 +- crypto_kem/frodokem976aes/clean/noise.c | 2 +- crypto_kem/frodokem976aes/opt/noise.c | 2 +- crypto_kem/frodokem976shake/clean/noise.c | 2 +- crypto_kem/frodokem976shake/opt/noise.c | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/crypto_kem/frodokem1344aes/clean/noise.c b/crypto_kem/frodokem1344aes/clean/noise.c index 9205c905..535e2f3f 100644 --- a/crypto_kem/frodokem1344aes/clean/noise.c +++ b/crypto_kem/frodokem1344aes/clean/noise.c @@ -10,7 +10,7 @@ #include "common.h" #include "params.h" -static uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; +static const uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; void PQCLEAN_FRODOKEM1344AES_CLEAN_sample_n(uint16_t *s, size_t n) { // Fills vector s with n samples from the noise distribution which requires 16 bits to sample. diff --git a/crypto_kem/frodokem1344aes/opt/noise.c b/crypto_kem/frodokem1344aes/opt/noise.c index 1e8b66c6..8e8720ad 100644 --- a/crypto_kem/frodokem1344aes/opt/noise.c +++ b/crypto_kem/frodokem1344aes/opt/noise.c @@ -10,7 +10,7 @@ #include "common.h" #include "params.h" -static uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; +static const uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; void PQCLEAN_FRODOKEM1344AES_OPT_sample_n(uint16_t *s, size_t n) { // Fills vector s with n samples from the noise distribution which requires 16 bits to sample. diff --git a/crypto_kem/frodokem1344shake/clean/noise.c b/crypto_kem/frodokem1344shake/clean/noise.c index 289d7aa3..7e68616f 100644 --- a/crypto_kem/frodokem1344shake/clean/noise.c +++ b/crypto_kem/frodokem1344shake/clean/noise.c @@ -10,7 +10,7 @@ #include "common.h" #include "params.h" -static uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; +static const uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; void PQCLEAN_FRODOKEM1344SHAKE_CLEAN_sample_n(uint16_t *s, size_t n) { // Fills vector s with n samples from the noise distribution which requires 16 bits to sample. diff --git a/crypto_kem/frodokem1344shake/opt/noise.c b/crypto_kem/frodokem1344shake/opt/noise.c index b64fe022..fbd5a6b9 100644 --- a/crypto_kem/frodokem1344shake/opt/noise.c +++ b/crypto_kem/frodokem1344shake/opt/noise.c @@ -10,7 +10,7 @@ #include "common.h" #include "params.h" -static uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; +static const uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; void PQCLEAN_FRODOKEM1344SHAKE_OPT_sample_n(uint16_t *s, size_t n) { // Fills vector s with n samples from the noise distribution which requires 16 bits to sample. diff --git a/crypto_kem/frodokem640aes/clean/noise.c b/crypto_kem/frodokem640aes/clean/noise.c index 44cd51be..1dc752a7 100644 --- a/crypto_kem/frodokem640aes/clean/noise.c +++ b/crypto_kem/frodokem640aes/clean/noise.c @@ -10,7 +10,7 @@ #include "common.h" #include "params.h" -static uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; +static const uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; void PQCLEAN_FRODOKEM640AES_CLEAN_sample_n(uint16_t *s, size_t n) { // Fills vector s with n samples from the noise distribution which requires 16 bits to sample. diff --git a/crypto_kem/frodokem640aes/opt/noise.c b/crypto_kem/frodokem640aes/opt/noise.c index 86ecf4d2..96bf9240 100644 --- a/crypto_kem/frodokem640aes/opt/noise.c +++ b/crypto_kem/frodokem640aes/opt/noise.c @@ -10,7 +10,7 @@ #include "common.h" #include "params.h" -static uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; +static const uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; void PQCLEAN_FRODOKEM640AES_OPT_sample_n(uint16_t *s, size_t n) { // Fills vector s with n samples from the noise distribution which requires 16 bits to sample. diff --git a/crypto_kem/frodokem640shake/clean/noise.c b/crypto_kem/frodokem640shake/clean/noise.c index 32b6938d..9ca892e3 100644 --- a/crypto_kem/frodokem640shake/clean/noise.c +++ b/crypto_kem/frodokem640shake/clean/noise.c @@ -10,7 +10,7 @@ #include "common.h" #include "params.h" -static uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; +static const uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; void PQCLEAN_FRODOKEM640SHAKE_CLEAN_sample_n(uint16_t *s, size_t n) { // Fills vector s with n samples from the noise distribution which requires 16 bits to sample. diff --git a/crypto_kem/frodokem640shake/opt/noise.c b/crypto_kem/frodokem640shake/opt/noise.c index 170a944b..3738b9a4 100644 --- a/crypto_kem/frodokem640shake/opt/noise.c +++ b/crypto_kem/frodokem640shake/opt/noise.c @@ -10,7 +10,7 @@ #include "common.h" #include "params.h" -static uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; +static const uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; void PQCLEAN_FRODOKEM640SHAKE_OPT_sample_n(uint16_t *s, size_t n) { // Fills vector s with n samples from the noise distribution which requires 16 bits to sample. diff --git a/crypto_kem/frodokem976aes/clean/noise.c b/crypto_kem/frodokem976aes/clean/noise.c index 8796e4d4..dcd674cb 100644 --- a/crypto_kem/frodokem976aes/clean/noise.c +++ b/crypto_kem/frodokem976aes/clean/noise.c @@ -10,7 +10,7 @@ #include "common.h" #include "params.h" -static uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; +static const uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; void PQCLEAN_FRODOKEM976AES_CLEAN_sample_n(uint16_t *s, size_t n) { // Fills vector s with n samples from the noise distribution which requires 16 bits to sample. diff --git a/crypto_kem/frodokem976aes/opt/noise.c b/crypto_kem/frodokem976aes/opt/noise.c index aa8aa1fd..f502b0c4 100644 --- a/crypto_kem/frodokem976aes/opt/noise.c +++ b/crypto_kem/frodokem976aes/opt/noise.c @@ -10,7 +10,7 @@ #include "common.h" #include "params.h" -static uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; +static const uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; void PQCLEAN_FRODOKEM976AES_OPT_sample_n(uint16_t *s, size_t n) { // Fills vector s with n samples from the noise distribution which requires 16 bits to sample. diff --git a/crypto_kem/frodokem976shake/clean/noise.c b/crypto_kem/frodokem976shake/clean/noise.c index e23892c8..6223d7a8 100644 --- a/crypto_kem/frodokem976shake/clean/noise.c +++ b/crypto_kem/frodokem976shake/clean/noise.c @@ -10,7 +10,7 @@ #include "common.h" #include "params.h" -static uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; +static const uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; void PQCLEAN_FRODOKEM976SHAKE_CLEAN_sample_n(uint16_t *s, size_t n) { // Fills vector s with n samples from the noise distribution which requires 16 bits to sample. diff --git a/crypto_kem/frodokem976shake/opt/noise.c b/crypto_kem/frodokem976shake/opt/noise.c index d75e1956..ed457d5a 100644 --- a/crypto_kem/frodokem976shake/opt/noise.c +++ b/crypto_kem/frodokem976shake/opt/noise.c @@ -10,7 +10,7 @@ #include "common.h" #include "params.h" -static uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; +static const uint16_t CDF_TABLE[CDF_TABLE_LEN] = CDF_TABLE_DATA; void PQCLEAN_FRODOKEM976SHAKE_OPT_sample_n(uint16_t *s, size_t n) { // Fills vector s with n samples from the noise distribution which requires 16 bits to sample.