libnm: mark static "eap_methods_table" array as const

This allows the linker to put the variable into read-only memory,
which is desirable here.
This commit is contained in:
Thomas Haller 2019-05-16 13:43:07 +02:00
parent fbddd27e73
commit bb38bfe731

View file

@ -92,7 +92,7 @@ typedef struct {
EAPMethodValidateFunc v_func;
} EAPMethodsTable;
static EAPMethodsTable eap_methods_table[];
static const EAPMethodsTable eap_methods_table[];
/*****************************************************************************/
@ -2787,7 +2787,7 @@ need_secrets_phase2 (NMSetting8021x *self,
}
}
static EAPMethodsTable eap_methods_table[] = {
static const EAPMethodsTable eap_methods_table[] = {
{ "leap", need_secrets_password, verify_identity },
{ "pwd", need_secrets_password, verify_identity },
{ "md5", need_secrets_password, verify_identity },