aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer
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_peer
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_peer')
-rw-r--r--src/eap_peer/eap.c2
-rw-r--r--src/eap_peer/eap.h2
-rw-r--r--src/eap_peer/eap_i.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/eap_peer/eap.c b/src/eap_peer/eap.c
index fc4af95..1dbe003 100644
--- a/src/eap_peer/eap.c
+++ b/src/eap_peer/eap.c
@@ -1911,7 +1911,7 @@ static void eap_peer_sm_tls_event(void *ctx, enum tls_event ev,
* structure remains alive while the EAP state machine is active.
*/
struct eap_sm * eap_peer_sm_init(void *eapol_ctx,
- struct eapol_callbacks *eapol_cb,
+ const struct eapol_callbacks *eapol_cb,
void *msg_ctx, struct eap_config *conf)
{
struct eap_sm *sm;
diff --git a/src/eap_peer/eap.h b/src/eap_peer/eap.h
index 702463b..1a645af 100644
--- a/src/eap_peer/eap.h
+++ b/src/eap_peer/eap.h
@@ -307,7 +307,7 @@ struct eap_config {
};
struct eap_sm * eap_peer_sm_init(void *eapol_ctx,
- struct eapol_callbacks *eapol_cb,
+ const struct eapol_callbacks *eapol_cb,
void *msg_ctx, struct eap_config *conf);
void eap_peer_sm_deinit(struct eap_sm *sm);
int eap_peer_sm_step(struct eap_sm *sm);
diff --git a/src/eap_peer/eap_i.h b/src/eap_peer/eap_i.h
index 2d7fdea..5f8b5fa 100644
--- a/src/eap_peer/eap_i.h
+++ b/src/eap_peer/eap_i.h
@@ -328,7 +328,7 @@ struct eap_sm {
/* not defined in RFC 4137 */
Boolean changed;
void *eapol_ctx;
- struct eapol_callbacks *eapol_cb;
+ const struct eapol_callbacks *eapol_cb;
void *eap_method_priv;
int init_phase2;
int fast_reauth;