Skip to contentSkip to conversation

cmd: tpm-v2: use correct format code

PATCH New Heinrich Schuchardt 2 participants 2 messages Jan 6, 2019 – Jan 16, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmd: tpm-v2: use correct format code

updates is defined as unsigned int. So use %u for printf().

---
 cmd/tpm-v2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
cmd/tpm-v2.c +1 -1
index bb51834c47..459a955d29 100644
@@ -151,7 +151,7 @@ static int do_tpm_pcr_read(cmd_tbl_t *cmdtp, int flag, int argc,
 
 	rc = tpm2_pcr_read(dev, index, priv->pcr_select_min, data, &updates);
 	if (!rc) {
-		printf("PCR #%u content (%d known updates):\n", index, updates);
+		printf("PCR #%u content (%u known updates):\n", index, updates);
 		print_byte_string(data, TPM2_DIGEST_LEN);
 	}
 
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 cmd: tpm-v2: use correct format code

Quoted 3 lines · Heinrich Schuchardt

updates is defined as unsigned int. So use %u for printf().

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190115/d9b5fd8d/attachment.sig>