From: Dan Streetman Date: Mon, 21 Aug 2023 14:42:35 +0000 (-0400) Subject: tpm2: move cast from lhs to rhs in uint16_t/int comparison X-Git-Tag: v255-rc1~630^2~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3cd4145f347461018fe79263534f59df6d3cde7a;p=thirdparty%2Fsystemd.git tpm2: move cast from lhs to rhs in uint16_t/int comparison --- 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;