diff options
author | Peter Meerwald <pmeerw@pmeerw.net> | 2014-03-29 18:03:05 +0100 |
---|---|---|
committer | Peter Meerwald <pmeerw@pmeerw.net> | 2014-04-16 00:02:14 +0200 |
commit | 36f775482f2e54e7de0b00ead980c6617e88bad3 (patch) | |
tree | 74b7829a9eafbacfc96711bca2f38127f2c73757 /src/utils/pactl.c | |
parent | edaa0282904b11cd4a708b2f985477284c17ec4c (diff) |
pactl: Clean up checking for VOL_RELATIVE flag
VOL_RELATIVE if a bit flag (1 << 4), hence we can simply do
if (vol_flags & VOL_RELATIVE) ...
instead of
if ((vol_flags & VOL_RELATIVE) == VOL_RELATIVE) ...
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Diffstat (limited to 'src/utils/pactl.c')
-rw-r--r-- | src/utils/pactl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/pactl.c b/src/utils/pactl.c index e6498d082..13ea64986 100644 --- a/src/utils/pactl.c +++ b/src/utils/pactl.c @@ -837,7 +837,7 @@ static void index_callback(pa_context *c, uint32_t idx, void *userdata) { } static void volume_relative_adjust(pa_cvolume *cv) { - pa_assert((volume_flags & VOL_RELATIVE) == VOL_RELATIVE); + pa_assert(volume_flags & VOL_RELATIVE); /* Relative volume change is additive in case of UINT or PERCENT * and multiplicative for LINEAR or DECIBEL */ @@ -1492,7 +1492,7 @@ static int parse_volume(const char *vol_spec, pa_volume_t *vol, enum volume_flag pa_xfree(vs); - if ((*vol_flags & VOL_RELATIVE) == VOL_RELATIVE) { + if (*vol_flags & VOL_RELATIVE) { if ((*vol_flags & 0x0F) == VOL_UINT) v += (double) PA_VOLUME_NORM; if ((*vol_flags & 0x0F) == VOL_PERCENT) |