Bug 69165 - two fixes about using function arguments incorrectly
Summary: two fixes about using function arguments incorrectly
Status: RESOLVED FIXED
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: 1.5
Hardware: Other All
: medium normal
Assignee: Havoc Pennington
QA Contact:
URL:
Whiteboard: review+
Keywords: patch
Depends on:
Blocks:
 
Reported: 2013-09-10 05:59 UTC by Chengwei Yang
Modified: 2013-09-13 13:52 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
[PATCH 1/2] Fix pass wrong type of argument to function (1.03 KB, patch)
2013-09-10 06:00 UTC, Chengwei Yang
Details | Splinter Review
[PATCH 2/2] Use the function argument rather than hard-code (1.09 KB, patch)
2013-09-10 06:01 UTC, Chengwei Yang
Details | Splinter Review

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.