mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-11 13:30:02 -05:00
libpulse: some minor optimizations when checking equality
This commit is contained in:
parent
50de2d85f9
commit
caa7928972
3 changed files with 16 additions and 0 deletions
|
|
@ -125,6 +125,10 @@ int pa_sample_spec_equal(const pa_sample_spec*a, const pa_sample_spec*b) {
|
|||
pa_assert(b);
|
||||
|
||||
pa_return_val_if_fail(pa_sample_spec_valid(a), 0);
|
||||
|
||||
if (PA_UNLIKELY(a == b))
|
||||
return 1;
|
||||
|
||||
pa_return_val_if_fail(pa_sample_spec_valid(b), 0);
|
||||
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue