diff options
author | Max Kellermann <max@duempel.org> | 2014-08-07 15:15:56 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-07 16:08:02 +0200 |
commit | 59d38f876a22ef520c6b897a356e8fb8677481aa (patch) | |
tree | ac97bf3dfa23a4ae30a1d76375493f8815c649ff /src/fs | |
parent | 5c5c6a965cc3af4c8e725c7c9cc377e80f728279 (diff) | |
download | mpd-59d38f876a22ef520c6b897a356e8fb8677481aa.tar.gz mpd-59d38f876a22ef520c6b897a356e8fb8677481aa.tar.xz mpd-59d38f876a22ef520c6b897a356e8fb8677481aa.zip |
util/StringUtil: add StripRight() overload with "end" argument
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/StandardDirectory.cxx | 5 |
1 files changed, 1 insertions, 4 deletions
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 <string.h> @@ -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 |