Bug 68932

Summary: TpHeap: don't compare the result of the comparator function against -1 or 1
Product: Telepathy Reporter: Debarshi Ray <rishi.is>
Component: tp-glibAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium    
Version: git master   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: TpHeap: comparator results are not guaranteed to be -1, 0 and 1

Description Debarshi Ray 2013-09-04 12:27:14 UTC
GCompareFunc can return any negative or positive number to denote inequality. So we shouldn't be comparing against -1 or 1.
Comment 1 Debarshi Ray 2013-09-04 12:29:31 UTC
Created attachment 85196 [details] [review]
TpHeap: comparator results are not guaranteed to be -1, 0 and 1
Comment 2 Simon McVittie 2013-09-04 12:30:58 UTC
Comment on attachment 85196 [details] [review]
TpHeap: comparator results are not guaranteed to be -1, 0 and 1

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

Looks good, I'll apply it.
Comment 3 Simon McVittie 2013-09-04 13:32:45 UTC
Thanks, fixed in git for 0.20.5, 0.21.2

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.