From dada56e9ffa3e64c9c8dd705adefae41848ab3eb Mon Sep 17 00:00:00 2001 From: Chris Savinovich <csavinovich@digium.com> Date: Thu, 14 Feb 2019 10:53:42 -0600 Subject: [PATCH] Revert "Test_cel: Fails when DONT_OPTIMIZE is off" This reverts commit 9b85882f04ed4b48e7bb318dbbb969d90159f13a. Change-Id: I36cf159abb103502e48d6f8fd70d560d7f0bda56 --- include/asterisk/strings.h | 14 +++++++++++++- main/strings.c | 14 -------------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h index 2d66716cd3..85393b4f95 100644 --- a/include/asterisk/strings.h +++ b/include/asterisk/strings.h @@ -1257,7 +1257,19 @@ static force_inline int attribute_pure ast_str_case_hash(const char *str) * * \retval str for convenience */ -char *attribute_pure ast_str_to_lower(char *str); +static force_inline char *attribute_pure ast_str_to_lower(char *str) +{ + char *str_orig = str; + if (!str) { + return str; + } + + for (; *str; ++str) { + *str = tolower(*str); + } + + return str_orig; +} /*! * \brief Convert a string to all upper-case diff --git a/main/strings.c b/main/strings.c index 43fbca4aa9..8102c3e9d0 100644 --- a/main/strings.c +++ b/main/strings.c @@ -391,17 +391,3 @@ char *ast_read_line_from_buffer(char **buffer) return start; } - -char *attribute_pure ast_str_to_lower(char *str) -{ - char *str_orig = str; - if (!str) { - return str; - } - - for (; *str; ++str) { - *str = tolower(*str); - } - - return str_orig; -} -- GitLab