]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tpm2: wrap (7) in UINT32_C()
authorDan Streetman <ddstreet@ieee.org>
Mon, 21 Aug 2023 23:21:21 +0000 (19:21 -0400)
committerDan Streetman <ddstreet@ieee.org>
Thu, 24 Aug 2023 16:35:58 +0000 (12:35 -0400)
src/shared/tpm2-util.h

index 0fd376a2e6dbc9ac0a46b8b958624ac2ecdc4ad4..1db28bf034ffd890ff24619a5b50fb7245ed7e3e 100644 (file)
@@ -249,7 +249,7 @@ int tpm2_make_luks2_json(int keyslot, uint32_t hash_pcr_mask, uint16_t pcr_bank,
 int tpm2_parse_luks2_json(JsonVariant *v, int *ret_keyslot, uint32_t *ret_hash_pcr_mask, uint16_t *ret_pcr_bank, void **ret_pubkey, size_t *ret_pubkey_size, uint32_t *ret_pubkey_pcr_mask, uint16_t *ret_primary_alg, void **ret_blob, size_t *ret_blob_size, void **ret_policy_hash, size_t *ret_policy_hash_size, void **ret_salt, size_t *ret_salt_size, void **ret_srk_buf, size_t *ret_srk_buf_size, TPM2Flags *ret_flags);
 
 /* Default to PCR 7 only */
-#define TPM2_PCR_INDEX_DEFAULT (7)
+#define TPM2_PCR_INDEX_DEFAULT UINT32_C(7)
 #define TPM2_PCR_MASK_DEFAULT INDEX_TO_MASK(uint32_t, TPM2_PCR_INDEX_DEFAULT)
 
 /* We want the helpers below to work also if TPM2 libs are not available, hence define these four defines if