summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-05-16 13:43:07 +0200
committerThomas Haller <thaller@redhat.com>2019-05-16 13:43:07 +0200
commitbb38bfe731742f0702233e76aae5c5edb8d81c21 (patch)
tree05eb758287e09d9b06596b24a097d5ed739e8af3
parentfbddd27e7383a60c2d72919b117d0ca3e7810a65 (diff)
downloadNetworkManager-bb38bfe731742f0702233e76aae5c5edb8d81c21.tar.gz
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.
-rw-r--r--libnm-core/nm-setting-8021x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libnm-core/nm-setting-8021x.c b/libnm-core/nm-setting-8021x.c
index 5114ff7419..ca008e0650 100644
--- a/libnm-core/nm-setting-8021x.c
+++ b/libnm-core/nm-setting-8021x.c
@@ -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 },