aboutsummaryrefslogtreecommitdiffstats
path: root/src/output
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-03-04 08:58:54 +0100
committerMax Kellermann <max@duempel.org>2015-03-04 08:58:59 +0100
commitcee3070ca4207e12b78722ea2b4b597eaab513c2 (patch)
tree396cd3420a79e7101ecdea0a6bd5602d6215fadb /src/output
parentcd08e5c7da399ce1fb2f84eb39af7fd684c3df80 (diff)
downloadmpd-cee3070ca4207e12b78722ea2b4b597eaab513c2.tar.gz
mpd-cee3070ca4207e12b78722ea2b4b597eaab513c2.tar.xz
mpd-cee3070ca4207e12b78722ea2b4b597eaab513c2.zip
output/winmm: use StringStartsWith() instead of strstr()
Diffstat (limited to 'src/output')
-rw-r--r--src/output/plugins/WinmmOutputPlugin.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/output/plugins/WinmmOutputPlugin.cxx b/src/output/plugins/WinmmOutputPlugin.cxx
index 95f359828..4c7664c72 100644
--- a/src/output/plugins/WinmmOutputPlugin.cxx
+++ b/src/output/plugins/WinmmOutputPlugin.cxx
@@ -25,6 +25,7 @@
#include "util/Error.hxx"
#include "util/Domain.hxx"
#include "util/Macros.hxx"
+#include "util/StringUtil.hxx"
#include <stdlib.h>
#include <string.h>
@@ -109,7 +110,7 @@ get_device_id(const char *device_name, UINT *device_id, Error &error)
continue;
/* szPname is only 32 chars long, so it is often truncated.
Use partial match to work around this. */
- if (strstr(device_name, caps.szPname) == device_name) {
+ if (StringStartsWith(device_name, caps.szPname)) {
*device_id = i;
return true;
}