summaryrefslogtreecommitdiffstats
path: root/src/shared/tpm2-util.c
diff options
context:
space:
mode:
authorDan Streetman <ddstreet@ieee.org>2023-08-21 16:42:35 +0200
committerDan Streetman <ddstreet@ieee.org>2023-08-24 18:31:00 +0200
commit3cd4145f347461018fe79263534f59df6d3cde7a (patch)
tree4117a37de421dbe2895072dffc27c7b1a6d6ef3a /src/shared/tpm2-util.c
parenttpm2: lowercase TPM2_PCR_VALUE[S]_VALID functions (diff)
downloadsystemd-3cd4145f347461018fe79263534f59df6d3cde7a.tar.xz
systemd-3cd4145f347461018fe79263534f59df6d3cde7a.zip
tpm2: move cast from lhs to rhs in uint16_t/int comparison
Diffstat (limited to '')
-rw-r--r--src/shared/tpm2-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/tpm2-util.c b/src/shared/tpm2-util.c
index cc90a379f8..51cb1beeb9 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;