[PATCH] uefi: securebootcert: make array securebootcert_info_table const

Colin King colin.king at canonical.com
Mon Sep 4 13:03:58 UTC 2017


From: Colin Ian King <colin.king at canonical.com>

Array securebootcert_info_table is static and read-only so make it
also const

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/uefi/securebootcert/securebootcert.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/uefi/securebootcert/securebootcert.c b/src/uefi/securebootcert/securebootcert.c
index b431b4ce..b58c4e70 100644
--- a/src/uefi/securebootcert/securebootcert.c
+++ b/src/uefi/securebootcert/securebootcert.c
@@ -387,7 +387,7 @@ static void securebootcert_key_ex_key(fwts_framework *fw, fwts_uefi_var *var, ch
 	}
 }
 
-static securebootcert_info securebootcert_info_table[] = {
+static const securebootcert_info securebootcert_info_table[] = {
 	{ "SecureBoot",		securebootcert_secure_boot },
 	{ "SetupMode",		securebootcert_setup_mode },
 	{ "db",			securebootcert_data_base },
@@ -401,7 +401,7 @@ static void securebootcert_var(fwts_framework *fw, fwts_uefi_var *var)
 {
 	char varname[512];
 	char guid_str[37];
-	securebootcert_info *info;
+	const securebootcert_info *info;
 
 	fwts_uefi_get_varname(varname, sizeof(varname), var);
 
-- 
2.14.1




More information about the fwts-devel mailing list