From 13e6b823a98b3bb52e8506e60df07785958b4dd9 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 3 Jun 2024 17:50:55 +0200 Subject: [PATCH] tpm2-util: make one sd_json_dispatch_field[] table static const --- src/shared/tpm2-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c index 421bb051f12..df38d8b2462 100644 --- a/src/shared/tpm2-util.c +++ b/src/shared/tpm2-util.c @@ -6991,7 +6991,7 @@ int tpm2_pcrlock_policy_from_json( /* We use a type check of _JSON_VARIANT_TYPE_INVALID for the integer fields to allow * json_dispatch_uint32() to parse strings as integers to work around the integer type weakness of * JSON's design. */ - sd_json_dispatch_field policy_dispatch[] = { + static const sd_json_dispatch_field policy_dispatch[] = { { "pcrBank", SD_JSON_VARIANT_STRING, json_dispatch_tpm2_algorithm, offsetof(Tpm2PCRLockPolicy, algorithm), SD_JSON_MANDATORY }, { "pcrValues", SD_JSON_VARIANT_ARRAY, sd_json_dispatch_variant, offsetof(Tpm2PCRLockPolicy, prediction_json), SD_JSON_MANDATORY }, { "nvIndex", _SD_JSON_VARIANT_TYPE_INVALID, sd_json_dispatch_uint32, offsetof(Tpm2PCRLockPolicy, nv_index), SD_JSON_MANDATORY }, -- 2.47.3