From cc4d6614b5922c1104125b1f4d0850a88a551882 Mon Sep 17 00:00:00 2001 From: Qihao Chencao Date: Tue, 28 Jun 2022 16:57:55 +0800 Subject: Use uintptr_t instead of performing pointer subtraction with a null pointer Signed-off-by: Qihao Chencao Reviewed-by: Adhemerval Zanella --- sysdeps/unix/sysv/linux/dl-sysdep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdeps/unix/sysv/linux') 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 -- cgit 1.4.1