aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-03-27 16:15:10 +0100
committerTobias Brunner <tobias@strongswan.org>2013-06-11 11:03:12 +0200
commit0e55270aeabc41a78240a691707103c6f9cde56b (patch)
tree7db214638f83711a959d2b58095dd16db2bd7a41 /src
parent7e9f6b276b8133d26a0704741d98a00dd3cc4ec2 (diff)
downloadstrongswan-0e55270aeabc41a78240a691707103c6f9cde56b.tar.bz2
strongswan-0e55270aeabc41a78240a691707103c6f9cde56b.tar.xz
Remove dead code in token enumerator
Since we always search for the nearest separator (and strip them from the front of the next token) there can't be any separators left at the end of a token.
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/collections/enumerator.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/libstrongswan/collections/enumerator.c b/src/libstrongswan/collections/enumerator.c
index f80cdabd2..8049ac016 100644
--- a/src/libstrongswan/collections/enumerator.c
+++ b/src/libstrongswan/collections/enumerator.c
@@ -264,7 +264,7 @@ static bool enumerate_token_enum(token_enum_t *this, char **token)
}
}
- /* trim trailing characters/separators */
+ /* trim trailing characters */
pos--;
while (pos >= *token)
{
@@ -278,17 +278,7 @@ static bool enumerate_token_enum(token_enum_t *this, char **token)
}
trim++;
}
- sep = this->sep;
- while (*sep)
- {
- if (*sep == *pos)
- {
- *(pos--) = '\0';
- break;
- }
- sep++;
- }
- if (!*trim && !*sep)
+ if (!*trim)
{
break;
}