Mapper, ...: use memcmp() instead of strncmp() where appropriate

Micro-optimization.
This commit is contained in:
Max Kellermann
2013-10-14 22:00:21 +02:00
parent b915e43391
commit 6fd481df97
7 changed files with 11 additions and 11 deletions

View File

@@ -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 */