Bug 69165

Summary: two fixes about using function arguments incorrectly
Product: dbus Reporter: Chengwei Yang <chengwei.yang.cn>
Component: coreAssignee: Havoc Pennington <hp>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: chengwei.yang.cn
Version: 1.5Keywords: patch
Hardware: Other   
OS: All   
Whiteboard: review+
i915 platform: i915 features:
Attachments: [PATCH 1/2] Fix pass wrong type of argument to function
[PATCH 2/2] Use the function argument rather than hard-code

Description Chengwei Yang 2013-09-10 05:59:38 UTC

    
Comment 1 Chengwei Yang 2013-09-10 06:00:44 UTC
Created attachment 85531 [details] [review]
[PATCH 1/2] Fix pass wrong type of argument to function
Comment 2 Chengwei Yang 2013-09-10 06:01:14 UTC
Created attachment 85532 [details] [review]
[PATCH 2/2] Use the function argument rather than hard-code
Comment 3 Simon McVittie 2013-09-13 11:31:13 UTC
Comment on attachment 85531 [details] [review]
[PATCH 1/2] Fix pass wrong type of argument to function

Review of attachment 85531 [details] [review]:
-----------------------------------------------------------------

OK for master. ISO C says the two usages are equivalent, so this is not significant enough for stable branches.
Comment 4 Simon McVittie 2013-09-13 11:33:29 UTC
Comment on attachment 85532 [details] [review]
[PATCH 2/2] Use the function argument rather than hard-code

Review of attachment 85532 [details] [review]:
-----------------------------------------------------------------

> This fix to use the function argument, meanwhile, this change doesn't
> has any effect in practice since this function only invoked once with
> a TRUE argument.

This function is public API, so in principle, a libdbus user could have been calling dbus_connection_set_route_peer_messages(c, FALSE) - but that's rather unlikely, and would have had the opposite of the desired effect, so I think we can conclude that nobody does.

I think that makes it worth applying this to dbus-1.6 - it's a real bugfix, not just an internal change.
Comment 5 Simon McVittie 2013-09-13 13:52:33 UTC
Fixed in git for 1.6.16 (2/2), 1.7.6 (both).

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.