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
@@ -175,7 +175,7 @@ static unsigned
|
||||
ParseStatus(const char *s)
|
||||
{
|
||||
/* skip the "HTTP/1.1" prefix */
|
||||
const char *space = strchr(s, ' ');
|
||||
const char *space = std::strchr(s, ' ');
|
||||
if (space == nullptr)
|
||||
return 0;
|
||||
|
||||
|
@@ -412,7 +412,7 @@ CreateNfsStorageURI(EventLoop &event_loop, const char *base)
|
||||
if (p == nullptr)
|
||||
return nullptr;
|
||||
|
||||
const char *mount = strchr(p, '/');
|
||||
const char *mount = std::strchr(p, '/');
|
||||
if (mount == nullptr)
|
||||
throw std::runtime_error("Malformed nfs:// URI");
|
||||
|
||||
|
@@ -357,7 +357,7 @@ CreateUdisksStorageURI(EventLoop &event_loop, const char *base_uri)
|
||||
|
||||
std::string id;
|
||||
|
||||
const char *relative_path = strchr(id_begin, '/');
|
||||
const char *relative_path = std::strchr(id_begin, '/');
|
||||
if (relative_path == nullptr) {
|
||||
id = id_begin;
|
||||
relative_path = "";
|
||||
|
Reference in New Issue
Block a user