summaryrefslogtreecommitdiffstats
path: root/src/modules/module-match.c
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2010-10-09 15:38:43 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2010-10-15 01:10:00 +0530
commit49101fc540aec9a249e97a9f650be38f9f92f5ac (patch)
tree6b2049a66cb3f4c43adcb424468ff2deb852df84 /src/modules/module-match.c
parent1d2ef7923d28a74e08a4309b6fa3d36481d2df3b (diff)
volume: Clamp volume to PA_VOLUME_MAX
This ensures that we always clamp the volume to PA_VOLUME_MAX. While this currently has no effect, it will be required for making sure we don't exceed PA_VOLUME_MAX when its value changes in the future.
Diffstat (limited to 'src/modules/module-match.c')
-rw-r--r--src/modules/module-match.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/module-match.c b/src/modules/module-match.c
index b1693f18..d83c86c3 100644
--- a/src/modules/module-match.c
+++ b/src/modules/module-match.c
@@ -127,7 +127,7 @@ static int load_rules(struct userdata *u, const char *filename) {
*d = 0;
if (pa_atou(v, &k) >= 0) {
- volume = (pa_volume_t) k;
+ volume = (pa_volume_t) PA_CLAMP_VOLUME(k);
} else if (*v == '"') {
char *e;