diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-11-17 23:24:49 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-11-18 01:34:31 +0100 |
commit | 718ca77232c8f6e5e368aca552c26996966b86ba (patch) | |
tree | 8f0dad75b55878c1942138eb7fbaf97140a75579 /src/cryptsetup/cryptsetup-tokens | |
parent | a810dd5c00fc4908764fca90b08d86af809a6073 (diff) | |
download | systemd-718ca77232c8f6e5e368aca552c26996966b86ba.tar.gz |
shared/json: use int64_t instead of intmax_t
We were already asserting that the intmax_t and uintmax_t types
are the same as int64_t and uint64_t. Pretty much everywhere in
the code base we use the latter types. In principle intmax_t could
be something different on some new architecture, and then the code would
fail to compile or behave differently. We actually do not want the code
to behave differently on those architectures, because that'd break
interoperability. So let's just use int64_t/uint64_t since that's what
we indend to use.
Diffstat (limited to 'src/cryptsetup/cryptsetup-tokens')
-rw-r--r-- | src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-tpm2.c | 2 | ||||
-rw-r--r-- | src/cryptsetup/cryptsetup-tokens/luks2-tpm2.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-tpm2.c b/src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-tpm2.c index 5471cb35b6..e2d28a5dda 100644 --- a/src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-tpm2.c +++ b/src/cryptsetup/cryptsetup-tokens/cryptsetup-token-systemd-tpm2.c @@ -200,7 +200,7 @@ _public_ int cryptsetup_token_validate( } JSON_VARIANT_ARRAY_FOREACH(e, w) { - uintmax_t u; + uint64_t u; if (!json_variant_is_number(e)) { crypt_log_debug(cd, "TPM2 PCR is not a number."); diff --git a/src/cryptsetup/cryptsetup-tokens/luks2-tpm2.c b/src/cryptsetup/cryptsetup-tokens/luks2-tpm2.c index 4167275317..3d39dfa884 100644 --- a/src/cryptsetup/cryptsetup-tokens/luks2-tpm2.c +++ b/src/cryptsetup/cryptsetup-tokens/luks2-tpm2.c @@ -78,7 +78,7 @@ int parse_luks2_tpm2_data( return -EINVAL; JSON_VARIANT_ARRAY_FOREACH(e, w) { - uintmax_t u; + uint64_t u; if (!json_variant_is_number(e)) return -EINVAL; |