LogBackend: use StripRight()

Eliminate duplicate code.
This commit is contained in:
Max Kellermann
2014-08-07 15:36:03 +02:00
parent 74aafe6a10
commit 5c5c6a965c
2 changed files with 5 additions and 6 deletions

View File

@@ -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