Move evutil_rtrim_lws_ to evutil.c where it belongs

This commit is contained in:
Nick Mathewson 2012-11-16 11:41:59 -05:00
parent c6ff381270
commit 61b93af561
2 changed files with 21 additions and 21 deletions

View File

@ -2199,6 +2199,27 @@ int evutil_ascii_strncasecmp(const char *s1, const char *s2, size_t n)
return 0;
}
void
evutil_rtrim_lws_(char *str)
{
char *cp;
if (str == NULL)
return;
if ((cp = strchr(str, '\0')) == NULL || (cp == str))
return;
--cp;
while (*cp == ' ' || *cp == '\t') {
*cp = '\0';
if (cp == str)
break;
--cp;
}
}
static int
evutil_issetugid(void)
{

21
http.c
View File

@ -219,27 +219,6 @@ strsep(char **s, const char *del)
}
#endif
void
evutil_rtrim_lws_(char *str)
{
char *cp;
if (str == NULL)
return;
if ((cp = strchr(str, '\0')) == NULL || (cp == str))
return;
--cp;
while (*cp == ' ' || *cp == '\t') {
*cp = '\0';
if (cp == str)
break;
--cp;
}
}
static size_t
html_replace(const char ch, const char **escaped)
{