Page MenuHomeFreeBSD

D39691.id.diff
No OneTemporary

D39691.id.diff

diff --git a/lib/libc/stdlib/qsort.c b/lib/libc/stdlib/qsort.c
--- a/lib/libc/stdlib/qsort.c
+++ b/lib/libc/stdlib/qsort.c
@@ -114,7 +114,8 @@
int cmp_result;
int swap_cnt;
- if (__predict_false(n == 0))
+ /* if there are less than 2 elements, then sorting is not needed */
+ if (__predict_false(n < 2))
return;
loop:
swap_cnt = 0;

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 5:53 AM (23 m, 8 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14671304
Default Alt Text
D39691.id.diff (345 B)

Event Timeline