[sr-dev] git:5.5:0b0e1352: drouting: remove unused trim function

Daniel-Constantin Mierla miconda at gmail.com
Fri Nov 5 08:51:24 CET 2021


Module: kamailio
Branch: 5.5
Commit: 0b0e13527059e6d3ae96235430e585203082dcc2
URL: https://github.com/kamailio/kamailio/commit/0b0e13527059e6d3ae96235430e585203082dcc2

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-11-05T08:47:06+01:00

drouting: remove unused trim function

(cherry picked from commit 38ae44336e8478c10e1a558997669850c5d7b297)

---

Modified: src/modules/drouting/dr_time.c

---

Diff:  https://github.com/kamailio/kamailio/commit/0b0e13527059e6d3ae96235430e585203082dcc2.diff
Patch: https://github.com/kamailio/kamailio/commit/0b0e13527059e6d3ae96235430e585203082dcc2.patch

---

diff --git a/src/modules/drouting/dr_time.c b/src/modules/drouting/dr_time.c
index 0988bccbb7..55d09a57ca 100644
--- a/src/modules/drouting/dr_time.c
+++ b/src/modules/drouting/dr_time.c
@@ -45,34 +45,6 @@ static inline int strz2int(char *_bp)
 }
 
 
-static inline char *trim(char *_s)
-{
-	int len;
-	char *end;
-
-	/* Null pointer, there is nothing to do */
-	if(!_s)
-		return _s;
-
-	/* Remove spaces and tabs from the beginning of string */
-	while((*_s == ' ') || (*_s == '\t'))
-		_s++;
-
-	len = strlen(_s);
-
-	end = _s + len - 1;
-
-	/* Remove trailing spaces and tabs */
-	while((*end == ' ') || (*end == '\t'))
-		end--;
-	if(end != (_s + len - 1)) {
-		*(end + 1) = '\0';
-	}
-
-	return _s;
-}
-
-
 /************************ imported from "ac_tm.c"  ***************************/
 
 /* #define USE_YWEEK_U		// Sunday system




More information about the sr-dev mailing list