diff options
author | Max Kellermann <max@duempel.org> | 2015-08-14 19:48:30 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-08-14 19:48:30 +0200 |
commit | 36cd73df51c6bae6b283f1bf14704d86ad98b3c5 (patch) | |
tree | 65a292077e077bf423fdb33a21e53f15982915a1 /src/command/DatabaseCommands.cxx | |
parent | 6f20889f00e4cee39ceac0f65109cdd013ee9a5d (diff) | |
download | mpd-36cd73df51c6bae6b283f1bf14704d86ad98b3c5.tar.gz mpd-36cd73df51c6bae6b283f1bf14704d86ad98b3c5.tar.xz mpd-36cd73df51c6bae6b283f1bf14704d86ad98b3c5.zip |
client, command: use StringIsEqual()
Diffstat (limited to 'src/command/DatabaseCommands.cxx')
-rw-r--r-- | src/command/DatabaseCommands.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/command/DatabaseCommands.cxx b/src/command/DatabaseCommands.cxx index ff139d925..dce086162 100644 --- a/src/command/DatabaseCommands.cxx +++ b/src/command/DatabaseCommands.cxx @@ -32,6 +32,7 @@ #include "tag/Tag.hxx" #include "util/ConstBuffer.hxx" #include "util/Error.hxx" +#include "util/StringAPI.hxx" #include "SongFilter.hxx" #include "BulkEdit.hxx" @@ -70,7 +71,7 @@ static CommandResult handle_match(Client &client, Request args, Response &r, bool fold_case) { RangeArg window; - if (args.size >= 2 && strcmp(args[args.size - 2], "window") == 0) { + if (args.size >= 2 && StringIsEqual(args[args.size - 2], "window")) { if (!args.Parse(args.size - 1, window, r)) return CommandResult::ERROR; @@ -163,7 +164,7 @@ CommandResult handle_count(Client &client, Request args, Response &r) { TagType group = TAG_NUM_OF_ITEM_TYPES; - if (args.size >= 2 && strcmp(args[args.size - 2], "group") == 0) { + if (args.size >= 2 && StringIsEqual(args[args.size - 2], "group")) { const char *s = args[args.size - 1]; group = tag_name_parse_i(s); if (group == TAG_NUM_OF_ITEM_TYPES) { @@ -231,7 +232,7 @@ handle_list(Client &client, Request args, Response &r) } while (args.size >= 2 && - strcmp(args[args.size - 2], "group") == 0) { + StringIsEqual(args[args.size - 2], "group")) { const char *s = args[args.size - 1]; TagType gt = tag_name_parse_i(s); if (gt == TAG_NUM_OF_ITEM_TYPES) { |