From 8f2f159f7f777f03ed52baff737b8c6b6e1d8711 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sun, 28 May 2023 20:24:53 +0000 Subject: [PATCH] krb/pac.c: Sprinkle const on global data never changed. --- lib/krb5/pac.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/krb5/pac.c b/lib/krb5/pac.c index a43f1a26d..e5b133f23 100644 --- a/lib/krb5/pac.c +++ b/lib/krb5/pac.c @@ -137,7 +137,7 @@ pac_dealloc(void *ctx) free(pac->pac); } -struct heim_type_data pac_object = { +static const struct heim_type_data pac_object = { HEIM_TID_PAC, "heim-pac", NULL, @@ -586,7 +586,7 @@ krb5_pac_get_buffer(krb5_context context, krb5_const_pac p, return ENOENT; } -static struct { +static const struct { uint32_t type; krb5_data name; } pac_buffer_name_map[] = { @@ -2032,8 +2032,8 @@ _krb5_pac_get_attributes_info(krb5_context context, return 0; } -static unsigned char single_zero = '\0'; -static krb5_data single_zero_pac = { 1, &single_zero }; +static const unsigned char single_zero = '\0'; +static const krb5_data single_zero_pac = { 1, rk_UNCONST(&single_zero) }; KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL _krb5_kdc_pac_ticket_parse(krb5_context context,