From 8c01f3387d09728f662ea9a26fb24432f7712c46 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Wed, 13 Dec 2023 14:46:12 +0100 Subject: [PATCH] constify src param of ogs_fqdn_{build,parse}() --- lib/proto/types.c | 4 ++-- lib/proto/types.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/proto/types.c b/lib/proto/types.c index adb2e3815..d8b0c2cb1 100644 --- a/lib/proto/types.c +++ b/lib/proto/types.c @@ -394,7 +394,7 @@ ogs_uint24_t ogs_s_nssai_sd_from_string(const char *hex) return ogs_uint24_from_string((char *)hex); } -int ogs_fqdn_build(char *dst, char *src, int length) +int ogs_fqdn_build(char *dst, const char *src, int length) { int i = 0, j = 0; @@ -411,7 +411,7 @@ int ogs_fqdn_build(char *dst, char *src, int length) return length+1; } -int ogs_fqdn_parse(char *dst, char *src, int length) +int ogs_fqdn_parse(char *dst, const char *src, int length) { int i = 0, j = 0; uint8_t len = 0; diff --git a/lib/proto/types.h b/lib/proto/types.h index 78b013a15..7ac37b9d2 100644 --- a/lib/proto/types.h +++ b/lib/proto/types.h @@ -574,8 +574,8 @@ typedef struct ogs_session_s { ogs_ip_t smf_ip; } ogs_session_t; -int ogs_fqdn_build(char *dst, char *src, int len); -int ogs_fqdn_parse(char *dst, char *src, int len); +int ogs_fqdn_build(char *dst, const char *src, int len); +int ogs_fqdn_parse(char *dst, const char *src, int len); /************************************************** * Protocol Configuration Options Structure