diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/cxx/utf8_util.cxx | 6 | ||||
-rw-r--r-- | src/libutil/cxx/utf8_util.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libutil/cxx/utf8_util.cxx b/src/libutil/cxx/utf8_util.cxx index cf71ae2ae..e42ef917f 100644 --- a/src/libutil/cxx/utf8_util.cxx +++ b/src/libutil/cxx/utf8_util.cxx @@ -30,10 +30,10 @@ #define DOCTEST_CONFIG_IMPLEMENTATION_IN_DLL #include "doctest/doctest.h" -char * -rspamd_string_unicode_trim_inplace (char *str, size_t *len) +const char * +rspamd_string_unicode_trim_inplace (const char *str, size_t *len) { - auto *p = str, *end = str + *len; + const auto *p = str, *end = str + *len; auto i = 0; while (i < *len) { diff --git a/src/libutil/cxx/utf8_util.h b/src/libutil/cxx/utf8_util.h index 21add9bae..242e03f00 100644 --- a/src/libutil/cxx/utf8_util.h +++ b/src/libutil/cxx/utf8_util.h @@ -32,7 +32,7 @@ extern "C" { * @param len length * @return new length of the string trimmed */ -char* rspamd_string_unicode_trim_inplace (char *str, size_t *len); +const char* rspamd_string_unicode_trim_inplace (const char *str, size_t *len); enum rspamd_normalise_result { RSPAMD_UNICODE_NORM_NORMAL = 0, |