Module: kamailio
Branch: master
Commit: cb41fc36a123d1fc3f9b30368ecd37ffa88c0730
URL:
https://github.com/kamailio/kamailio/commit/cb41fc36a123d1fc3f9b30368ecd37f…
Author: Henning Westerholt <hw(a)skalatan.de>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2019-11-23T23:14:16+01:00
nat_traversal: remove not needed (and redundant) str trim implementation
---
Modified: src/modules/nat_traversal/nat_traversal.c
---
Diff:
https://github.com/kamailio/kamailio/commit/cb41fc36a123d1fc3f9b30368ecd37f…
Patch:
https://github.com/kamailio/kamailio/commit/cb41fc36a123d1fc3f9b30368ecd37f…
---
diff --git a/src/modules/nat_traversal/nat_traversal.c
b/src/modules/nat_traversal/nat_traversal.c
index 7bf0ae8c02..709b9032cd 100644
--- a/src/modules/nat_traversal/nat_traversal.c
+++ b/src/modules/nat_traversal/nat_traversal.c
@@ -730,34 +730,6 @@ static bool Dialog_Param_add_candidate(Dialog_Param *param, char
*candidate)
// Miscellaneous helper functions
//
-// returns str with leading whitespace removed
-static INLINE void ltrim(str *string)
-{
- while(string->len > 0 && isspace((int)*(string->s))) {
- string->len--;
- string->s++;
- }
-}
-
-// returns str with trailing whitespace removed
-static INLINE void rtrim(str *string)
-{
- char *ptr;
-
- ptr = string->s + string->len - 1;
- while(string->len > 0 && (*ptr == 0 || isspace((int)*ptr))) {
- string->len--;
- ptr--;
- }
-}
-
-// returns str with leading and trailing whitespace removed
-static INLINE void trim(str *string)
-{
- ltrim(string);
- rtrim(string);
-}
-
static bool get_contact_uri(
struct sip_msg *msg, struct sip_uri *uri, contact_t **_c)
{