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:
Rosen Penev
2020-04-30 19:25:55 -07:00
committed by Max Kellermann
parent 99afe8e6d1
commit e4dad42ca1
34 changed files with 71 additions and 77 deletions
+2 -3
View File
@@ -35,6 +35,7 @@
#include <algorithm>
#include <cassert>
#include <cstring>
#ifdef _WIN32
#include <ws2tcpip.h>
@@ -49,8 +50,6 @@
#include <sys/un.h>
#endif
#include <string.h>
#ifdef HAVE_UN
static std::string
@@ -104,7 +103,7 @@ ToString(SocketAddress address) noexcept
return "unknown";
#ifdef HAVE_IPV6
if (strchr(host, ':') != nullptr) {
if (std::strchr(host, ':') != nullptr) {
std::string result("[");
result.append(host);
result.append("]:");