aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2021-08-27 17:45:43 +0000
committerDimitry Andric <dim@FreeBSD.org>2021-08-31 19:11:00 +0000
commita2ddb544867a6100fc4b684772897134511bb72c (patch)
tree168b17650e6c139254c33f781101e80627738a80 /lib
parentf1a8fe3aed9a513e0ab87055de1442462e7c1e9b (diff)
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/stdlib/merge.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libc/stdlib/merge.c b/lib/libc/stdlib/merge.c
index 3a47e424e4da..566f8cba0a3d 100644
--- a/lib/libc/stdlib/merge.c
+++ b/lib/libc/stdlib/merge.c
@@ -131,12 +131,8 @@ mergesort(void *base, size_t nmemb, size_t size, cmp_t cmp)
if (nmemb == 0)
return (0);
- /*
- * XXX
- * Stupid subtraction for the Cray.
- */
iflag = 0;
- if (!(size % ISIZE) && !(((char *)base - (char *)0) % ISIZE))
+ if (__is_aligned(size, ISIZE) && __is_aligned(base, ISIZE))
iflag = 1;
if ((list2 = malloc(nmemb * size + PSIZE)) == NULL)