[PATCH] Sort "loose" dives properly in-between trips

Linus Torvalds torvalds at linux-foundation.org
Mon Jan 7 09:19:20 PST 2013


On Mon, Jan 7, 2013 at 9:11 AM, Linus Torvalds
<torvalds at linux-foundation.org> wrote:
>
> Don't you want to compare when_a/when_b when trips are NULL? Turning
> that "return 0" into just "return when_a - when_b;" should do that..

Side note: both your patch *and* that extension to it make be a bit
worried. The problem is that the ordering needs to be properly
anti-commutative and transitive, or the sort may get into endless
loops. And I'm not 100% convinced your sort order is properly
transitive (ie "a < b" and "b < c" has to imply "a < c", and I'm not
conviced it does with your patch _or _ with the extension)

             Linus


More information about the subsurface mailing list