Blob Blame Raw
From 4becb1303fee8bd7b377292c74589d6ec69009ae Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Tue, 12 Jun 2018 14:36:20 -0400
Subject: [PATCH 05/17] efivar: Fix some types in -L behavior to pacify
 coverity.

Coverity doesn't realize that efi_well_known_guids is /actually/ an
array, because we didn't tell it so.  So fix the declaration so we've
told it so.

Signed-off-by: Peter Jones <pjones@redhat.com>
---
 src/efivar.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/efivar.c b/src/efivar.c
index 9ee3b397e29..228bdb745a7 100644
--- a/src/efivar.c
+++ b/src/efivar.c
@@ -485,13 +485,13 @@ int main(int argc, char *argv[])
 		case ACTION_LIST_GUIDS: {
 			efi_guid_t sentinal = {0xffffffff,0xffff,0xffff,0xffff,
 					       {0xff,0xff,0xff,0xff,0xff,0xff}};
-			extern struct guidname efi_well_known_guids;
+			extern struct guidname efi_well_known_guids[];
 			extern struct guidname efi_well_known_guids_end;
 			intptr_t start = (intptr_t)&efi_well_known_guids;
 			intptr_t end = (intptr_t)&efi_well_known_guids_end;
 			unsigned int i;
 
-			struct guidname *guid = &efi_well_known_guids;
+			struct guidname *guid = &efi_well_known_guids[0];
 			for (i = 0; i < (end-start) / sizeof(*guid); i++) {
 				if (!efi_guid_cmp(&sentinal, &guid[i].guid))
 					break;
-- 
2.17.1