From 881dcaf7aa262e3c14c104e49e65cd2ee3bf93c3 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 28 Jul 2016 08:02:48 +0200 Subject: Mark input string to osmo_talloc_replace_string() as const This allows us to pass in strings that are 'const', which for the source of a copy should be the normal/regular case anyway. Change-Id: Icee6a5f88babd3a4e30bf0886f0f8d3b865d80ce --- include/osmocom/core/utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/osmocom/core/utils.h b/include/osmocom/core/utils.h index 476e492b..01d55205 100644 --- a/include/osmocom/core/utils.h +++ b/include/osmocom/core/utils.h @@ -71,7 +71,7 @@ do { \ * \param[in] ctx Talloc context to use for allocation * \param[out] dst pointer to string, will be updated with ptr to new string * \param[in] newstr String that will be copieed to newly allocated string */ -static inline void osmo_talloc_replace_string(void *ctx, char **dst, char *newstr) +static inline void osmo_talloc_replace_string(void *ctx, char **dst, const char *newstr) { if (*dst) talloc_free(*dst); -- cgit v1.2.3