From 3cd4145f347461018fe79263534f59df6d3cde7a Mon Sep 17 00:00:00 2001 From: Dan Streetman Date: Mon, 21 Aug 2023 10:42:35 -0400 Subject: [PATCH] tpm2: move cast from lhs to rhs in uint16_t/int comparison --- src/shared/tpm2-util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c index cc90a379f89..51cb1beeb92 100644 --- a/src/shared/tpm2-util.c +++ b/src/shared/tpm2-util.c @@ -1537,7 +1537,7 @@ bool tpm2_pcr_value_valid(const Tpm2PCRValue *pcr_value) { if (r < 0) return false; - if ((int) pcr_value->value.size != r) { + if (pcr_value->value.size != (size_t) r) { log_debug("PCR hash 0x%" PRIx16 " expected size %d does not match actual size %" PRIu16 ".", pcr_value->hash, r, pcr_value->value.size); return false; -- 2.47.3