aboutsummaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-08-14 19:48:30 +0200
committerMax Kellermann <max@duempel.org>2015-08-14 19:48:30 +0200
commit36cd73df51c6bae6b283f1bf14704d86ad98b3c5 (patch)
tree65a292077e077bf423fdb33a21e53f15982915a1 /src/client
parent6f20889f00e4cee39ceac0f65109cdd013ee9a5d (diff)
downloadmpd-36cd73df51c6bae6b283f1bf14704d86ad98b3c5.tar.gz
mpd-36cd73df51c6bae6b283f1bf14704d86ad98b3c5.tar.xz
mpd-36cd73df51c6bae6b283f1bf14704d86ad98b3c5.zip
client, command: use StringIsEqual()
Diffstat (limited to 'src/client')
-rw-r--r--src/client/ClientProcess.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/client/ClientProcess.cxx b/src/client/ClientProcess.cxx
index 2aec79297..1502e0d96 100644
--- a/src/client/ClientProcess.cxx
+++ b/src/client/ClientProcess.cxx
@@ -22,8 +22,7 @@
#include "protocol/Result.hxx"
#include "command/AllCommands.hxx"
#include "Log.hxx"
-
-#include <string.h>
+#include "util/StringAPI.hxx"
#define CLIENT_LIST_MODE_BEGIN "command_list_begin"
#define CLIENT_LIST_OK_MODE_BEGIN "command_list_ok_begin"
@@ -56,7 +55,7 @@ client_process_line(Client &client, char *line)
{
CommandResult ret;
- if (strcmp(line, "noidle") == 0) {
+ if (StringIsEqual(line, "noidle")) {
if (client.idle_waiting) {
/* send empty idle response and leave idle mode */
client.idle_waiting = false;
@@ -78,7 +77,7 @@ client_process_line(Client &client, char *line)
}
if (client.cmd_list.IsActive()) {
- if (strcmp(line, CLIENT_LIST_MODE_END) == 0) {
+ if (StringIsEqual(line, CLIENT_LIST_MODE_END)) {
FormatDebug(client_domain,
"[%u] process command list",
client.num);
@@ -113,10 +112,10 @@ client_process_line(Client &client, char *line)
ret = CommandResult::OK;
}
} else {
- if (strcmp(line, CLIENT_LIST_MODE_BEGIN) == 0) {
+ if (StringIsEqual(line, CLIENT_LIST_MODE_BEGIN)) {
client.cmd_list.Begin(false);
ret = CommandResult::OK;
- } else if (strcmp(line, CLIENT_LIST_OK_MODE_BEGIN) == 0) {
+ } else if (StringIsEqual(line, CLIENT_LIST_OK_MODE_BEGIN)) {
client.cmd_list.Begin(true);
ret = CommandResult::OK;
} else {