core: Work around -Wlogical-not-parentheses warnings
authorPeter Meerwald <pmeerw@pmeerw.net>
Tue, 26 May 2015 21:35:10 +0000 (23:35 +0200)
committerPeter Meerwald <pmeerw@pmeerw.net>
Wed, 27 May 2015 17:16:38 +0000 (19:16 +0200)
commit1db12f50106735f021202b51bc62e1bfc16260f1
treeb32d6f727597dcee32488b29d07c2a0f59577299
parent6942e13a364bbaa1f9f4659936b4e40bad24ac4f
core: Work around -Wlogical-not-parentheses warnings

pulsecore/sink.c: In function 'pa_sink_put':
pulsecore/sink.c:648:53: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
     pa_assert(!(s->flags & PA_SINK_DYNAMIC_LATENCY) == (s->thread_info.fixed_latency != 0));
                                                     ^

pulsecore/source.c: In function 'pa_source_put':
pulsecore/source.c:599:55: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
     pa_assert(!(s->flags & PA_SOURCE_DYNAMIC_LATENCY) == (s->thread_info.fixed_latency != 0));
                                                       ^
rewrite expression to suppress warning:
!(x & MASK) == (y != 0)
<->
!(x & MASK) == !(y == 0)

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
src/pulsecore/sink.c
src/pulsecore/source.c