From bb38bfe731742f0702233e76aae5c5edb8d81c21 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 16 May 2019 13:43:07 +0200 Subject: [PATCH] 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. --- libnm-core/nm-setting-8021x.c | 4 ++-- 1 file 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 },