mirror of
https://github.com/rkd77/elinks.git
synced 2025-06-30 22:19:29 -04:00
[qsort] Here also overflow was possible
This commit is contained in:
parent
0bc2a31ef9
commit
2d59c94b68
@ -191,7 +191,15 @@ compare_nodes(const void *a, const void *b)
|
|||||||
void *nodea = ((struct el_node_elem *)a)->node;
|
void *nodea = ((struct el_node_elem *)a)->node;
|
||||||
void *nodeb = ((struct el_node_elem *)b)->node;
|
void *nodeb = ((struct el_node_elem *)b)->node;
|
||||||
|
|
||||||
return nodea - nodeb;
|
if (nodea < nodeb) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nodea > nodeb) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
x
Reference in New Issue
Block a user