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
@@ -84,7 +84,7 @@ SocketAddress::GetLocalPath() const noexcept
|
||||
/* must be null-terminated */
|
||||
raw.back() == 0 &&
|
||||
/* there must not be any other null byte */
|
||||
memchr(raw.data, 0, raw.size - 1) == nullptr
|
||||
std::memchr(raw.data, 0, raw.size - 1) == nullptr
|
||||
? raw.data
|
||||
: nullptr;
|
||||
}
|
||||
|
Reference in New Issue
Block a user