|
|
ac385c |
From 089265335dfb746a77ec15a917c12e8c77a41240 Mon Sep 17 00:00:00 2001
|
|
|
ac385c |
From: Peter Jones <pjones@redhat.com>
|
|
|
ac385c |
Date: Mon, 1 May 2017 15:34:28 -0400
|
|
|
ac385c |
Subject: [PATCH 19/22] efivar main(): explain efi_well_known_guids to the
|
|
|
ac385c |
compiler better.
|
|
|
ac385c |
|
|
|
ac385c |
Covscan doesn't quite understand that this _is_ an array, so make it
|
|
|
ac385c |
look even more like one.
|
|
|
ac385c |
|
|
|
ac385c |
Signed-off-by: Peter Jones <pjones@redhat.com>
|
|
|
ac385c |
---
|
|
|
ac385c |
src/efivar.c | 6 +++---
|
|
|
ac385c |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
ac385c |
|
|
|
ac385c |
diff --git a/src/efivar.c b/src/efivar.c
|
|
|
ac385c |
index 38d19e1..3ed9a84 100644
|
|
|
ac385c |
--- a/src/efivar.c
|
|
|
ac385c |
+++ b/src/efivar.c
|
|
|
ac385c |
@@ -461,13 +461,13 @@ int main(int argc, char *argv[])
|
|
|
ac385c |
case ACTION_LIST_GUIDS: {
|
|
|
ac385c |
efi_guid_t sentinal = {0xffffffff,0xffff,0xffff,0xffff,
|
|
|
ac385c |
{0xff,0xff,0xff,0xff,0xff,0xff}};
|
|
|
ac385c |
- extern struct guidname efi_well_known_guids;
|
|
|
ac385c |
- extern struct guidname efi_well_known_guids_end;
|
|
|
ac385c |
+ extern struct guidname efi_well_known_guids[];
|
|
|
ac385c |
+ extern struct guidname *efi_well_known_guids_end;
|
|
|
ac385c |
intptr_t start = (intptr_t)&efi_well_known_guids;
|
|
|
ac385c |
intptr_t end = (intptr_t)&efi_well_known_guids_end;
|
|
|
ac385c |
unsigned int i;
|
|
|
ac385c |
|
|
|
ac385c |
- struct guidname *guid = &efi_well_known_guids;
|
|
|
ac385c |
+ struct guidname *guid = &efi_well_known_guids[0];
|
|
|
ac385c |
for (i = 0; i < (end-start) / sizeof(*guid); i++) {
|
|
|
ac385c |
if (!efi_guid_cmp(&sentinal, &guid[i].guid))
|
|
|
ac385c |
break;
|
|
|
ac385c |
--
|
|
|
ac385c |
2.12.2
|
|
|
ac385c |
|