Fix conditional in heapq function.
This commit is contained in:
parent
f3f472b860
commit
a6b3719d89
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ _siftupmax_s(heap_t *h, __TYPE spos)
|
||||||
/* Set childpos to index of smaller child. */
|
/* Set childpos to index of smaller child. */
|
||||||
rightpos = childpos + 1;
|
rightpos = childpos + 1;
|
||||||
if (rightpos < endpos) {
|
if (rightpos < endpos) {
|
||||||
if (! (heap[rightpos] < heap[childpos]))
|
if (heap[rightpos] < heap[childpos])
|
||||||
childpos = rightpos;
|
childpos = rightpos;
|
||||||
}
|
}
|
||||||
/* Move the smaller child up. */
|
/* Move the smaller child up. */
|
||||||
|
|
Loading…
Reference in a new issue