mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
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>
This commit is contained in:
committed by
Adhemerval Zanella
parent
dab6344279
commit
cc4d6614b5
@@ -239,7 +239,7 @@ parse_list (char **linep, char *eol, char *buf_end, int terminator_c,
|
||||
|
||||
/* Adjust the pointer so it is aligned for storing pointers. */
|
||||
eol += __alignof__ (char *) - 1;
|
||||
eol -= (eol - (char *) 0) % __alignof__ (char *);
|
||||
eol -= ((uintptr_t) eol) % __alignof__ (char *);
|
||||
/* We will start the storage here for the vector of pointers. */
|
||||
list = (char **) eol;
|
||||
|
||||
|
Reference in New Issue
Block a user