mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +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
@@ -281,7 +281,7 @@ get_next_alias (FILE *stream, const char *match, struct aliasent *result,
|
||||
/* Adjust the pointer so it is aligned for
|
||||
storing pointers. */
|
||||
first_unused += __alignof__ (char *) - 1;
|
||||
first_unused -= ((first_unused - (char *) 0)
|
||||
first_unused -= (((uintptr_t) first_unused)
|
||||
% __alignof__ (char *));
|
||||
result->alias_members = (char **) first_unused;
|
||||
|
||||
|
Reference in New Issue
Block a user