]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
src/boot: assume that intmax_t is the biggest integer
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 14 May 2025 20:03:29 +0000 (22:03 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 16 May 2025 13:31:58 +0000 (15:31 +0200)
Same as in 81d7934882ae13c64d9b08d365a0baa011cb2fbb, intmax_t by definition is
the widest int. Strictly speaking, the check whether
  sizeof(intmax_t) == sizeof(long long)
in the code below is redundant, but I think it's nicer to keep it for symmetry
with the other cases.

Requested in
https://github.com/systemd/systemd/pull/37442#pullrequestreview-2840906908.

src/boot/efi-string.c

index 4b9c3181c087b9f67eb468bd9733543d9c32dfd8..59cb0fa9f5498a477eeb9714ac27c79a13b173e1 100644 (file)
@@ -755,7 +755,7 @@ static bool handle_format_specifier(FormatContext *ctx, SpecifierContext *sp) {
          * otherwise warn about fetching smaller types. */
         assert_cc(sizeof(int) == 4);
         assert_cc(sizeof(wchar_t) <= sizeof(int));
-        assert_cc(sizeof(intmax_t) <= sizeof(long long));
+        assert_cc(sizeof(long long) == sizeof(intmax_t));
 
         assert(ctx);
         assert(sp);