Instead of passing a GUID by value to the hash_algo_supported() function, prefer passing a pointer.
Signed-off-by: Vincent Stehlé <[email protected]> Cc: Heinrich Schuchardt <[email protected]> Cc: Ilias Apalodimas <[email protected]> Cc: Tom Rini <[email protected]> --- lib/efi_loader/efi_signature.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/efi_loader/efi_signature.c b/lib/efi_loader/efi_signature.c index c2be5cb61b3..21a96426356 100644 --- a/lib/efi_loader/efi_signature.c +++ b/lib/efi_loader/efi_signature.c @@ -166,7 +166,7 @@ bool efi_hash_regions(struct image_region *regs, int count, * * Return: true if supported false otherwise */ -static bool hash_algo_supported(const efi_guid_t guid) +static bool hash_algo_supported(const efi_guid_t *guid) { int i; const efi_guid_t unsupported_hashes[] = { @@ -177,7 +177,7 @@ static bool hash_algo_supported(const efi_guid_t guid) }; for (i = 0; i < ARRAY_SIZE(unsupported_hashes); i++) { - if (!guidcmp(&unsupported_hashes[i], &guid)) + if (!guidcmp(&unsupported_hashes[i], guid)) return false; } @@ -219,7 +219,7 @@ bool efi_signature_lookup_digest(struct efi_image_regions *regs, * if the hash algorithm is unsupported and we get an entry in * dbx reject the image */ - if (dbx && !hash_algo_supported(siglist->sig_type)) { + if (dbx && !hash_algo_supported(&siglist->sig_type)) { found = true; continue; }; --- base-commit: 509312dc5386ff4c5adabf53a573abca0aac4ce5 change-id: 20260907-guidptr-9865d0f0dd1b Best regards, -- Vincent.
