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>
This commit is contained in:
Mikael Kanstrup 2015-04-24 09:19:53 +02:00 committed by Jouni Malinen
parent fd4fb28179
commit 8b423edbd3
32 changed files with 93 additions and 92 deletions

View file

@ -139,7 +139,7 @@ struct eap_config {
struct eap_sm * eap_server_sm_init(void *eapol_ctx,
struct eapol_callbacks *eapol_cb,
const struct eapol_callbacks *eapol_cb,
struct eap_config *eap_conf);
void eap_server_sm_deinit(struct eap_sm *sm);
int eap_server_sm_step(struct eap_sm *sm);

View file

@ -155,7 +155,7 @@ struct eap_sm {
/* not defined in RFC 4137 */
Boolean changed;
void *eapol_ctx, *msg_ctx;
struct eapol_callbacks *eapol_cb;
const struct eapol_callbacks *eapol_cb;
void *eap_method_priv;
u8 *identity;
size_t identity_len;

View file

@ -1802,7 +1802,7 @@ static void eap_user_free(struct eap_user *user)
* This function allocates and initializes an EAP state machine.
*/
struct eap_sm * eap_server_sm_init(void *eapol_ctx,
struct eapol_callbacks *eapol_cb,
const struct eapol_callbacks *eapol_cb,
struct eap_config *conf)
{
struct eap_sm *sm;