about summary refs log tree commit diff
path: root/stdlib/msort.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/msort.c')
-rw-r--r--stdlib/msort.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/stdlib/msort.c b/stdlib/msort.c
index 6dd1cc3aa1..bbaa5e9f82 100644
--- a/stdlib/msort.c
+++ b/stdlib/msort.c
@@ -281,15 +281,15 @@ __qsort_r (void *b, size_t n, size_t s, __compar_d_fn_t cmp, void *arg)
   else
     {
       if ((s & (sizeof (uint32_t) - 1)) == 0
-	  && ((char *) b - (char *) 0) % __alignof__ (uint32_t) == 0)
+	  && ((uintptr_t) b) % __alignof__ (uint32_t) == 0)
 	{
 	  if (s == sizeof (uint32_t))
 	    p.var = 0;
 	  else if (s == sizeof (uint64_t)
-		   && ((char *) b - (char *) 0) % __alignof__ (uint64_t) == 0)
+		   && ((uintptr_t) b) % __alignof__ (uint64_t) == 0)
 	    p.var = 1;
 	  else if ((s & (sizeof (unsigned long) - 1)) == 0
-		   && ((char *) b - (char *) 0)
+		   && ((uintptr_t) b)
 		      % __alignof__ (unsigned long) == 0)
 	    p.var = 2;
 	}