Bug 72414 - bluetooth/module-bluetooth-policy.c:150: possible bad if test ?
Summary: bluetooth/module-bluetooth-policy.c:150: possible bad if test ?
Status: RESOLVED FIXED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: modules (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-06 20:20 UTC by dcb314
Modified: 2013-12-14 07:36 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description dcb314 2013-12-06 20:20:14 UTC
I just ran static analyser "cppcheck" over the
source code of pulseaudio-4.0-266-gf81e3. It said
many things, including

[modules/bluetooth/module-bluetooth-policy.c:150] -> [modules/bluetooth/module-bluetooth-policy.c:150]: (style) Same expression on both sides of '>'.

Source code is

        if (result == NULL ||
            (profile->available == PA_AVAILABLE_YES && result->available == PA_AVAILABLE_UNKNOWN) ||
            (profile->available == result->available && profile->priority > profile->priority))

Suggest code rework.
Comment 1 Tanu Kaskinen 2013-12-14 07:36:33 UTC
Thanks for reporting! This is now fixed: http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=643eb5bae2c58246657cdfebe19002da2cee292e


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.