1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00

macro: fix ALIGN_TO() to use ULLONG_MAX instead of ULONGLONG_MAX

<limits.h> calls this ULLONG_MAX. It's not clear to me where ULONGLONG_MAX
can be found. This seems to be just a mistake.

Fixes: c7ed718720 ('macro: handle overflow in ALIGN_TO() somewhat reasonably')
This commit is contained in:
Thomas Haller 2021-10-08 09:44:39 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent e338284f9b
commit e4d294c46d

View File

@ -151,7 +151,7 @@ static inline size_t ALIGN_TO(size_t l, size_t ali) {
assert(__builtin_popcount(ali) == 1);
#elif SIZE_MAX == ULONG_MAX
assert(__builtin_popcountl(ali) == 1);
#elif SIZE_MAX == ULONGLONG_MAX
#elif SIZE_MAX == ULLONG_MAX
assert(__builtin_popcountll(ali) == 1);
#else
#error "Unexpected size_t"