aboutsummaryrefslogtreecommitdiffstats
path: root/src/mixer/Volume.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-11-11 15:34:36 +0100
committerMax Kellermann <max@duempel.org>2015-11-11 15:34:36 +0100
commit738583e3d4cd7a35aec545448f86a8c097768785 (patch)
tree67e0ed29ea1aa6c44ccaa7de1b5297715bc06f43 /src/mixer/Volume.cxx
parentc513478c31c8543309da5f04bb472ea6e4969603 (diff)
downloadmpd-738583e3d4cd7a35aec545448f86a8c097768785.tar.gz
mpd-738583e3d4cd7a35aec545448f86a8c097768785.tar.xz
mpd-738583e3d4cd7a35aec545448f86a8c097768785.zip
StateFile: use StringAfterPrefix() instead of StringStartsWith()
Diffstat (limited to 'src/mixer/Volume.cxx')
-rw-r--r--src/mixer/Volume.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mixer/Volume.cxx b/src/mixer/Volume.cxx
index 8b4928953..35def63e9 100644
--- a/src/mixer/Volume.cxx
+++ b/src/mixer/Volume.cxx
@@ -98,10 +98,10 @@ read_sw_volume_state(const char *line, MultipleOutputs &outputs)
char *end = nullptr;
long int sv;
- if (!StringStartsWith(line, SW_VOLUME_STATE))
+ line = StringAfterPrefix(line, SW_VOLUME_STATE);
+ if (line == nullptr)
return false;
- line += sizeof(SW_VOLUME_STATE) - 1;
sv = strtol(line, &end, 10);
if (*end == 0 && sv >= 0 && sv <= 100)
software_volume_change(outputs, sv);