From c16281f5e74cacaf8392de7f0c8d51b8c9e1e6f5 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 27 Mar 2024 12:44:46 +0100 Subject: [PATCH] constify {hnbap_rua}_cause_str() argument ranap_cause_str() already had a const input argument, but the HNBAP and RUA equivalents for some reason had a non-const input. Change-Id: I7db92b51847c282d23d568970dfd2bedecdea486 --- include/osmocom/hnbap/hnbap_common.h | 2 +- include/osmocom/rua/rua_common.h | 2 +- src/hnbap_common.c | 2 +- src/rua_common.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/osmocom/hnbap/hnbap_common.h b/include/osmocom/hnbap/hnbap_common.h index af619e27..75981d94 100644 --- a/include/osmocom/hnbap/hnbap_common.h +++ b/include/osmocom/hnbap/hnbap_common.h @@ -149,6 +149,6 @@ struct msgb *hnbap_generate_unsuccessful_outcome( HNBAP_IE_t *hnbap_new_ie(HNBAP_ProtocolIE_ID_t id, HNBAP_Criticality_t criticality, asn_TYPE_descriptor_t *type, void *sptr); -char *hnbap_cause_str(HNBAP_Cause_t *cause); +char *hnbap_cause_str(const HNBAP_Cause_t *cause); void hnbap_set_log_area(int log_area); diff --git a/include/osmocom/rua/rua_common.h b/include/osmocom/rua/rua_common.h index 7967c91b..a88c9a24 100644 --- a/include/osmocom/rua/rua_common.h +++ b/include/osmocom/rua/rua_common.h @@ -69,6 +69,6 @@ struct msgb *rua_generate_unsuccessful_outcome( RUA_IE_t *rua_new_ie(RUA_ProtocolIE_ID_t id, RUA_Criticality_t criticality, asn_TYPE_descriptor_t *type, void *sptr); -char *rua_cause_str(RUA_Cause_t *cause); +char *rua_cause_str(const RUA_Cause_t *cause); void rua_set_log_area(int log_area); diff --git a/src/hnbap_common.c b/src/hnbap_common.c index 67cc30c3..10a29fae 100644 --- a/src/hnbap_common.c +++ b/src/hnbap_common.c @@ -78,7 +78,7 @@ static const struct value_string hnbap_cause_misc_vals[] = { { 0, NULL } }; -char *hnbap_cause_str(HNBAP_Cause_t *cause) +char *hnbap_cause_str(const HNBAP_Cause_t *cause) { static char buf[32]; diff --git a/src/rua_common.c b/src/rua_common.c index 37cf3bac..0cb84268 100644 --- a/src/rua_common.c +++ b/src/rua_common.c @@ -67,7 +67,7 @@ static const struct value_string rua_cause_misc_vals[] = { { 0, NULL } }; -char *rua_cause_str(RUA_Cause_t *cause) +char *rua_cause_str(const RUA_Cause_t *cause) { static char buf[32];