diff options
author | Max Kellermann <max@duempel.org> | 2014-08-07 15:36:03 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-08-07 16:08:02 +0200 |
commit | 5c5c6a965cc3af4c8e725c7c9cc377e80f728279 (patch) | |
tree | b29fdff7344e3cfecf532e5afbfdf1f8469d4803 /src/LogBackend.cxx | |
parent | 74aafe6a105f807f4ee2a8c59096aa82d8432b67 (diff) |
LogBackend: use StripRight()
Eliminate duplicate code.
Diffstat (limited to 'src/LogBackend.cxx')
-rw-r--r-- | src/LogBackend.cxx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/LogBackend.cxx b/src/LogBackend.cxx index 6f1794521..6591fef2d 100644 --- a/src/LogBackend.cxx +++ b/src/LogBackend.cxx @@ -21,7 +21,7 @@ #include "LogBackend.hxx" #include "Log.hxx" #include "util/Domain.hxx" -#include "util/CharUtil.hxx" +#include "util/StringUtil.hxx" #ifdef HAVE_GLIB #include <glib.h> @@ -119,11 +119,7 @@ static int chomp_length(const char *p) { size_t length = strlen(p); - - while (length > 0 && IsWhitespaceFast(p[length - 1])) - --length; - - return (int)length; + return StripRight(p, length); } #ifdef HAVE_SYSLOG |