summaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-07-28 08:02:48 +0200
committerHarald Welte <laforge@gnumonks.org>2016-07-28 08:02:48 +0200
commit881dcaf7aa262e3c14c104e49e65cd2ee3bf93c3 (patch)
treeaee7373dc6ccfdf436c6935a993763e721e452d8 /include/osmocom
parent9a5bbf36b543ff89c0ed148428d97300880c5804 (diff)
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
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/core/utils.h2
1 files changed, 1 insertions, 1 deletions
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);