Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107361459
D28134.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
620 B
Referenced Files
None
Subscribers
None
D28134.diff
View Options
diff --git a/lib/libc/stdlib/merge.c b/lib/libc/stdlib/merge.c
--- a/lib/libc/stdlib/merge.c
+++ b/lib/libc/stdlib/merge.c
@@ -52,7 +52,7 @@
* (The default is pairwise merging.)
*/
-#include <sys/types.h>
+#include <sys/param.h>
#include <errno.h>
#include <stdlib.h>
@@ -97,9 +97,7 @@
* boundaries.
*/
/* Assumption: PSIZE is a power of 2. */
-#define EVAL(p) (u_char **) \
- ((u_char *)0 + \
- (((u_char *)p + PSIZE - 1 - (u_char *) 0) & ~(PSIZE - 1)))
+#define EVAL(p) (u_char **)roundup2((uintptr_t)p, PSIZE)
#ifdef I_AM_MERGESORT_B
int mergesort_b(void *, size_t, size_t, cmp_t);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jan 14, 1:26 AM (19 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15789643
Default Alt Text
D28134.diff (620 B)
Attached To
Mode
D28134: libc: Fix null pointer arithmetic warning in mergesort
Attached
Detach File
Event Timeline
Log In to Comment