mirror of git://sourceware.org/git/glibc.git
malloc: Fix clang build after 1c588a2187
clang issues:
malloc.c:1909:8: error: converting the result of '<<' to a boolean always evaluates to true [-Werror,-Wtautological-constant-compare]
1909 | if (!DEFAULT_THP_PAGESIZE || mp_.thp_mode != malloc_thp_mode_not_supported)
| ^
../sysdeps/unix/sysv/linux/aarch64/malloc-hugepages.h:19:35: note: expanded from macro 'DEFAULT_THP_PAGESIZE'
19 | #define DEFAULT_THP_PAGESIZE (1UL << 21)
Checked on aarch64-linux-gnu.
This commit is contained in:
parent
d8561d1552
commit
bd56942533
|
|
@ -1906,7 +1906,7 @@ static __always_inline void
|
|||
thp_init (void)
|
||||
{
|
||||
/* Initialize only once if DEFAULT_THP_PAGESIZE is defined. */
|
||||
if (!DEFAULT_THP_PAGESIZE || mp_.thp_mode != malloc_thp_mode_not_supported)
|
||||
if (DEFAULT_THP_PAGESIZE == 0 || mp_.thp_mode != malloc_thp_mode_not_supported)
|
||||
return;
|
||||
|
||||
/* Set thp_pagesize even if thp_mode is never. This reduces frequency
|
||||
|
|
|
|||
Loading…
Reference in New Issue