aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_common
diff options
context:
space:
mode:
authorMikael Kanstrup <mikael.kanstrup@sonymobile.com>2015-04-24 07:19:53 (GMT)
committerJouni Malinen <j@w1.fi>2015-04-25 14:33:06 (GMT)
commit8b423edbd3bb7b5b90cf3d82103d44bedab63e5c (patch)
tree12eb22ee298692ca04144fa97818aa1f8e93c0ab /src/eap_common
parentfd4fb28179a0b750dff4d38a72a7bf89a2c49813 (diff)
downloadhostap-8b423edbd3bb7b5b90cf3d82103d44bedab63e5c.zip
hostap-8b423edbd3bb7b5b90cf3d82103d44bedab63e5c.tar.gz
hostap-8b423edbd3bb7b5b90cf3d82103d44bedab63e5c.tar.bz2
Declare all read only data structures as const
By analysing objdump output some read only structures were found in .data section. To help compiler further optimize code declare these as const. Signed-off-by: Mikael Kanstrup <mikael.kanstrup@sonymobile.com>
Diffstat (limited to 'src/eap_common')
-rw-r--r--src/eap_common/ikev2_common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eap_common/ikev2_common.c b/src/eap_common/ikev2_common.c
index 4f9e64e..d60358c 100644
--- a/src/eap_common/ikev2_common.c
+++ b/src/eap_common/ikev2_common.c
@@ -16,7 +16,7 @@
#include "ikev2_common.h"
-static struct ikev2_integ_alg ikev2_integ_algs[] = {
+static const struct ikev2_integ_alg ikev2_integ_algs[] = {
{ AUTH_HMAC_SHA1_96, 20, 12 },
{ AUTH_HMAC_MD5_96, 16, 12 }
};
@@ -24,7 +24,7 @@ static struct ikev2_integ_alg ikev2_integ_algs[] = {
#define NUM_INTEG_ALGS ARRAY_SIZE(ikev2_integ_algs)
-static struct ikev2_prf_alg ikev2_prf_algs[] = {
+static const struct ikev2_prf_alg ikev2_prf_algs[] = {
{ PRF_HMAC_SHA1, 20, 20 },
{ PRF_HMAC_MD5, 16, 16 }
};
@@ -32,7 +32,7 @@ static struct ikev2_prf_alg ikev2_prf_algs[] = {
#define NUM_PRF_ALGS ARRAY_SIZE(ikev2_prf_algs)
-static struct ikev2_encr_alg ikev2_encr_algs[] = {
+static const struct ikev2_encr_alg ikev2_encr_algs[] = {
{ ENCR_AES_CBC, 16, 16 }, /* only 128-bit keys supported for now */
{ ENCR_3DES, 24, 8 }
};