diff options
author | Qihao Chencao <twose@qq.com> | 2022-06-28 16:57:55 +0800 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2023-02-17 17:07:44 -0300 |
commit | cc4d6614b5922c1104125b1f4d0850a88a551882 (patch) | |
tree | aade315fd79153cf930e8dfd15581dcbdffea0b8 /sysdeps/unix | |
parent | dab63442791e334d592ce91827ffa9d14ca92ea9 (diff) | |
download | glibc-cc4d6614b5922c1104125b1f4d0850a88a551882.zip glibc-cc4d6614b5922c1104125b1f4d0850a88a551882.tar.gz glibc-cc4d6614b5922c1104125b1f4d0850a88a551882.tar.bz2 |
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.c | 2 |
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 7065df8..1b3dd86 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 |