From 59d38f876a22ef520c6b897a356e8fb8677481aa Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 7 Aug 2014 15:15:56 +0200 Subject: util/StringUtil: add StripRight() overload with "end" argument --- src/fs/StandardDirectory.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/fs') diff --git a/src/fs/StandardDirectory.cxx b/src/fs/StandardDirectory.cxx index c922b22d3..ea91399d1 100644 --- a/src/fs/StandardDirectory.cxx +++ b/src/fs/StandardDirectory.cxx @@ -40,7 +40,6 @@ #endif #ifdef USE_XDG -#include "util/CharUtil.hxx" #include "util/StringUtil.hxx" #include "TextFile.hxx" #include @@ -169,9 +168,7 @@ ParseConfigLine(char *line, const char *dir_name, AllocatedPath &result_dir) if (line_end == nullptr) return true; } else { - line_end = line + strlen(line); - while (line < line_end && IsWhitespaceNotNull(line_end[-1])) - --line_end; + line_end = StripRight(line, line + strlen(line)); } // check for empty result -- cgit v1.2.3