about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorQihao Chencao <twose@qq.com>2022-06-28 16:57:55 +0800
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2023-02-17 17:07:44 -0300
commitcc4d6614b5922c1104125b1f4d0850a88a551882 (patch)
treeaade315fd79153cf930e8dfd15581dcbdffea0b8 /sysdeps/unix
parentdab63442791e334d592ce91827ffa9d14ca92ea9 (diff)
downloadglibc-cc4d6614b5922c1104125b1f4d0850a88a551882.tar.gz
glibc-cc4d6614b5922c1104125b1f4d0850a88a551882.tar.xz
glibc-cc4d6614b5922c1104125b1f4d0850a88a551882.zip
Use uintptr_t instead of performing pointer subtraction with a null pointer
Signed-off-by: Qihao Chencao <twose@qq.com>

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/dl-sysdep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdeps/unix/sysv/linux/dl-sysdep.c b/sysdeps/unix/sysv/linux/dl-sysdep.c
index 7065df8ace..1b3dd869b5 100644
--- a/sysdeps/unix/sysv/linux/dl-sysdep.c
+++ b/sysdeps/unix/sysv/linux/dl-sysdep.c
@@ -129,7 +129,7 @@ _dl_sysdep_start (void **start_argptr,
        break up that far.  When the user program examines its break, it
        will see this new value and not clobber our data.  */
     __sbrk (GLRO(dl_pagesize)
-	    - ((_end - (char *) 0) & (GLRO(dl_pagesize) - 1)));
+	    - (((uintptr_t) _end) & (GLRO(dl_pagesize) - 1)));
 
   /* If this is a SUID program we make sure that FDs 0, 1, and 2 are
      allocated.  If necessary we are doing it ourself.  If it is not