Module: sip-router
Branch: sr_3.0
Commit: 895e166d730efe6a975136b69171a9f097243771
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=895e166d730efe6a975136b69171a9f097243771

Author: Marius Zbihlei <[email protected]>
Committer: Henning Westerholt <[email protected]>
Date:   Tue Oct 27 13:26:55 2009 +0200

Rewritten this small helper function
(cherry picked from commit 4fed4c7b9db9ca8ad1b034d5afbd86fea4ebd6ba)

---

 modules/utils/conf.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/modules/utils/conf.c b/modules/utils/conf.c
index 0ba4feb..5df2a16 100644
--- a/modules/utils/conf.c
+++ b/modules/utils/conf.c
@@ -75,11 +75,11 @@ static int fwd_max_id = 0;
 static void remove_spaces(char *s)
 {
        char *p, *dst;
-
-       for (p = s, dst = s; *dst != '\0'; ++p, ++dst) {
-               while (isspace(*p)) ++p;
-               *dst = *p;
+       for (p = s, dst = s; *p != '\0'; ++p) {
+               if (!isspace(*p)) *dst++ = *p;
        }
+       *dst = '\0';
+
 }
 
 


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to