[Asterisk-code-review] Revert "Test cel: Fails when DONT OPTIMIZE is off" (asterisk[16])

George Joseph asteriskteam at digium.com
Thu Feb 14 12:11:39 CST 2019


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/10997 )

Change subject: Revert "Test_cel: Fails when DONT_OPTIMIZE is off"
......................................................................

Revert "Test_cel: Fails when DONT_OPTIMIZE is off"

This reverts commit 05b79d16ab93b038b39412e2570a21205eb499c4.

Change-Id: I2e64fc22c33b10cfd592681732fc67ae0669a301
---
M include/asterisk/strings.h
M main/strings.c
2 files changed, 13 insertions(+), 16 deletions(-)

Approvals:
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/include/asterisk/strings.h b/include/asterisk/strings.h
index aaf2737..e4bef5f 100644
--- a/include/asterisk/strings.h
+++ b/include/asterisk/strings.h
@@ -1212,7 +1212,19 @@
  *
  * \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 a18bb48..640af61 100644
--- a/main/strings.c
+++ b/main/strings.c
@@ -421,18 +421,3 @@
 
 	return 0;
 }
-
-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;
-}
-

-- 
To view, visit https://gerrit.asterisk.org/10997
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-MessageType: merged
Gerrit-Change-Id: I2e64fc22c33b10cfd592681732fc67ae0669a301
Gerrit-Change-Number: 10997
Gerrit-PatchSet: 2
Gerrit-Owner: Chris Savinovich <csavinovich at digium.com>
Gerrit-Reviewer: Friendly Automation (1000185)
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua C. Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190214/8285791e/attachment.html>


More information about the asterisk-code-review mailing list