From 49101fc540aec9a249e97a9f650be38f9f92f5ac Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Sat, 9 Oct 2010 15:38:43 +0530 Subject: 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. --- src/modules/module-match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/modules/module-match.c') 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; -- cgit