]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
macro: fix ALIGN_TO() to use ULLONG_MAX instead of ULONGLONG_MAX
authorThomas Haller <thaller@redhat.com>
Fri, 8 Oct 2021 07:44:39 +0000 (09:44 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 11 Oct 2021 06:30:58 +0000 (08:30 +0200)
<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: c7ed7187203c ('macro: handle overflow in ALIGN_TO() somewhat reasonably')
src/basic/macro.h

index 6977a1ddd94b47be46c85772a922574bbedc1291..6d5840a832d9c466d86e35c9e75347aed9984d0d 100644 (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"