From 3dc989bccb396daf87c2b3791079e5ba92b5aba4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 6 Nov 2015 09:35:42 +0100 Subject: input/alsa: use StringAfterPrefix() --- src/input/plugins/AlsaInputPlugin.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/input/plugins/AlsaInputPlugin.cxx b/src/input/plugins/AlsaInputPlugin.cxx index f39574e43..da08a7c5d 100644 --- a/src/input/plugins/AlsaInputPlugin.cxx +++ b/src/input/plugins/AlsaInputPlugin.cxx @@ -159,11 +159,10 @@ inline InputStream * AlsaInputStream::Create(const char *uri, Mutex &mutex, Cond &cond, Error &error) { - const char *const scheme = "alsa://"; - if (!StringStartsWith(uri, scheme)) + const char *device = StringAfterPrefix(uri, "alsa://"); + if (device == nullptr) return nullptr; - const char *device = uri + strlen(scheme); if (*device == 0) device = default_device; -- cgit v1.2.3