use std chr functions
The ones in std have overloads for const char/char. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:

committed by
Max Kellermann

parent
99afe8e6d1
commit
e4dad42ca1
@@ -23,7 +23,7 @@
|
||||
#include "Instance.hxx"
|
||||
#include "util/StringStrip.hxx"
|
||||
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
|
||||
BufferedSocket::InputResult
|
||||
Client::OnSocketInput(void *data, size_t length) noexcept
|
||||
@@ -32,7 +32,7 @@ Client::OnSocketInput(void *data, size_t length) noexcept
|
||||
return InputResult::PAUSE;
|
||||
|
||||
char *p = (char *)data;
|
||||
char *newline = (char *)memchr(p, '\n', length);
|
||||
char *newline = (char *)std::memchr(p, '\n', length);
|
||||
if (newline == nullptr)
|
||||
return InputResult::MORE;
|
||||
|
||||
|
Reference in New Issue
Block a user