Bug 68932 - TpHeap: don't compare the result of the comparator function against -1 or 1
Summary: TpHeap: don't compare the result of the comparator function against -1 or 1
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: git master
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-09-04 12:27 UTC by Debarshi Ray
Modified: 2013-09-04 13:32 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
TpHeap: comparator results are not guaranteed to be -1, 0 and 1 (1.62 KB, patch)
2013-09-04 12:29 UTC, Debarshi Ray
Details | Splinter Review

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.