Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177465197
D1752.1794487472.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
718 B
Referenced Files
None
Subscribers
None
D1752.1794487472.diff
View Options
Index: lib/libc/stdlib/qsort.c
===================================================================
--- lib/libc/stdlib/qsort.c
+++ lib/libc/stdlib/qsort.c
@@ -59,8 +59,9 @@
} while (--i > 0); \
}
-#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(long) || \
- es % sizeof(long) ? 2 : es == sizeof(long)? 0 : 1;
+#define SWAPINIT(a, es) swaptype = ((char *)a - (char *)0) % sizeof(int) || \
+ es % sizeof(int) ? 2 : ((char *)a - (char *)0) % sizeof(long) ? 1 : \
+ es != sizeof(long);
static inline void
swapfunc(a, b, n, swaptype)
@@ -68,7 +69,7 @@
int n, swaptype;
{
if(swaptype <= 1)
- swapcode(long, a, b, n)
+ swapcode(int, a, b, n)
else
swapcode(char, a, b, n)
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 12, 12:44 PM (1 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41676232
Default Alt Text
D1752.1794487472.diff (718 B)
Attached To
Mode
D1752: PR 135718 enhance qsort(3) to properly handle 32-bit aligned data on 64-bit systems
Attached
Detach File
Event Timeline