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/QueueCommands.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/QueueCommands.cxx') diff --git a/src/QueueCommands.cxx b/src/QueueCommands.cxx index a70a5f250..0bb984364 100644 --- a/src/QueueCommands.cxx +++ b/src/QueueCommands.cxx @@ -43,7 +43,7 @@ handle_add(Client *client, gcc_unused int argc, char *argv[]) char *uri = argv[1]; enum playlist_result result; - if (strncmp(uri, "file:///", 8) == 0) { + if (memcmp(uri, "file:///", 8) == 0) { const char *path_utf8 = uri + 7; const Path path_fs = Path::FromUTF8(path_utf8); @@ -86,7 +86,7 @@ handle_addid(Client *client, int argc, char *argv[]) unsigned added_id; enum playlist_result result; - if (strncmp(uri, "file:///", 8) == 0) { + if (memcmp(uri, "file:///", 8) == 0) { const char *path_utf8 = uri + 7; const Path path_fs = Path::FromUTF8(path_utf8); -- cgit v1.2.3