From 24e1ae2f0ed3e2c2be680aad6e88313661bf57ee Mon Sep 17 00:00:00 2001 From: Harrison Mutai Date: Thu, 28 Nov 2024 14:31:41 +0000 Subject: [PATCH] fix(handoff): fix message formatting of hex values Our implementation of printf does not support flag format specifiers. Our previous format specification as a result was causing the integer values to be omitted. This change updates the formatting to ensure accurate and complete error messages are displayed. Change-Id: I80cfb5fd7ff26e44cfad4e06803d9e0912488136 Signed-off-by: Harrison Mutai --- lib/transfer_list/transfer_list.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/transfer_list/transfer_list.c b/lib/transfer_list/transfer_list.c index 35dc418d5..07614a684 100644 --- a/lib/transfer_list/transfer_list.c +++ b/lib/transfer_list/transfer_list.c @@ -168,30 +168,29 @@ transfer_list_check_header(const struct transfer_list_header *tl) } if (tl->signature != TRANSFER_LIST_SIGNATURE) { - ERROR("Bad transfer list signature %#" PRIx32 "\n", - tl->signature); + ERROR("Bad transfer list signature 0x%x\n", tl->signature); return TL_OPS_NON; } if (!tl->max_size) { - ERROR("Bad transfer list max size %#" PRIx32 "\n", + ERROR("Bad transfer list max size 0x%x\n", tl->max_size); return TL_OPS_NON; } if (tl->size > tl->max_size) { - ERROR("Bad transfer list size %#" PRIx32 "\n", tl->size); + ERROR("Bad transfer list size 0x%x\n", tl->size); return TL_OPS_NON; } if (tl->hdr_size != sizeof(struct transfer_list_header)) { - ERROR("Bad transfer list header size %#" PRIx32 "\n", + ERROR("Bad transfer list header size 0x%x\n", tl->hdr_size); return TL_OPS_NON; } if (!transfer_list_verify_checksum(tl)) { - ERROR("Bad transfer list checksum %#" PRIx32 "\n", + ERROR("Bad transfer list checksum 0x%x\n", tl->checksum); return TL_OPS_NON; }