diff options
author | Max Kellermann <max@duempel.org> | 2013-10-14 22:00:21 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-10-14 22:00:21 +0200 |
commit | 6fd481df978ad4666780ef838e6c8540f6ea190f (patch) | |
tree | e437903388be90df8a92c58c05af8f4f51c7e8e1 /src/QueueCommands.cxx | |
parent | b915e433911b4597626c721a8ae4a6e9dae6ac5a (diff) | |
download | mpd-6fd481df978ad4666780ef838e6c8540f6ea190f.tar.gz mpd-6fd481df978ad4666780ef838e6c8540f6ea190f.tar.xz mpd-6fd481df978ad4666780ef838e6c8540f6ea190f.zip |
Mapper, ...: use memcmp() instead of strncmp() where appropriate
Micro-optimization.
Diffstat (limited to 'src/QueueCommands.cxx')
-rw-r--r-- | src/QueueCommands.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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); |