From 6fd481df978ad4666780ef838e6c8540f6ea190f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 14 Oct 2013 22:00:21 +0200 Subject: Mapper, ...: use memcmp() instead of strncmp() where appropriate Micro-optimization. --- src/util/UriUtil.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/util') diff --git a/src/util/UriUtil.cxx b/src/util/UriUtil.cxx index 4b0cec11b..a326530e0 100644 --- a/src/util/UriUtil.cxx +++ b/src/util/UriUtil.cxx @@ -86,9 +86,9 @@ uri_remove_auth(const char *uri) const char *auth, *slash, *at; char *p; - if (strncmp(uri, "http://", 7) == 0) + if (memcmp(uri, "http://", 7) == 0) auth = uri + 7; - else if (strncmp(uri, "https://", 8) == 0) + else if (memcmp(uri, "https://", 8) == 0) auth = uri + 8; else /* unrecognized URI */ -- cgit v1.2.3