From 61b93af5618fb164ceb64dc96e6a47347043c629 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Fri, 16 Nov 2012 11:41:59 -0500 Subject: [PATCH] Move evutil_rtrim_lws_ to evutil.c where it belongs --- evutil.c | 21 +++++++++++++++++++++ http.c | 21 --------------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/evutil.c b/evutil.c index 6af2bcc8..efeb2537 100644 --- a/evutil.c +++ b/evutil.c @@ -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) { diff --git a/http.c b/http.c index c4c72f6e..7c93609a 100644 --- a/http.c +++ b/http.c @@ -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) {