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.
This commit is contained in:
Tobias Brunner 2013-03-27 16:15:10 +01:00
parent 7e9f6b276b
commit 0e55270aea
1 changed files with 2 additions and 12 deletions

View File

@ -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;
}