Module: sip-router
Branch: master
Commit: 4fed4c7b9db9ca8ad1b034d5afbd86fea4ebd6ba
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=4fed4c7…
Author: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Committer: Marius Zbihlei <marius.zbihlei(a)1and1.ro>
Date: Tue Oct 27 13:26:55 2009 +0200
Rewritten this small helper function
---
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 9ffc61f..3710b3e 100644
--- a/modules/utils/conf.c
+++ b/modules/utils/conf.c
@@ -79,11 +79,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';
+
}