summaryrefslogtreecommitdiff
path: root/crypto/drbg.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2015-12-07 21:36:57 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2015-12-10 22:39:44 +0800
commit01998b932a15f6d4190233a63a60d22f39bb6866 (patch)
treece4fe392f9cda8a060a38028bfe597065e9e6844 /crypto/drbg.c
parenta6b4ab981699dcddd849cbca065f60d7914cb559 (diff)
downloadlinux-crypto-01998b932a15f6d4190233a63a60d22f39bb6866.tar.gz
linux-crypto-01998b932a15f6d4190233a63a60d22f39bb6866.zip
crypto: drbg - constify drbg_state_ops structures
The drbg_state_ops structures are never modified, so declare them as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/drbg.c')
-rw-r--r--crypto/drbg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/drbg.c b/crypto/drbg.c
index a7c23146..ab6ef1d0 100644
--- a/crypto/drbg.c
+++ b/crypto/drbg.c
@@ -626,7 +626,7 @@ out:
return len;
}
-static struct drbg_state_ops drbg_ctr_ops = {
+static const struct drbg_state_ops drbg_ctr_ops = {
.update = drbg_ctr_update,
.generate = drbg_ctr_generate,
.crypto_init = drbg_init_sym_kernel,
@@ -752,7 +752,7 @@ static int drbg_hmac_generate(struct drbg_state *drbg,
return len;
}
-static struct drbg_state_ops drbg_hmac_ops = {
+static const struct drbg_state_ops drbg_hmac_ops = {
.update = drbg_hmac_update,
.generate = drbg_hmac_generate,
.crypto_init = drbg_init_hash_kernel,
@@ -1032,7 +1032,7 @@ out:
* scratchpad usage: as update and generate are used isolated, both
* can use the scratchpad
*/
-static struct drbg_state_ops drbg_hash_ops = {
+static const struct drbg_state_ops drbg_hash_ops = {
.update = drbg_hash_update,
.generate = drbg_hash_generate,
.crypto_init = drbg_init_hash_kernel,