projects
/
platform
/
upstream
/
gummiboot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
49d4ae4
)
Fix conditional loop when there are no entries
author
Felipe Contreras
<felipe.contreras@gmail.com>
Thu, 11 Oct 2012 17:42:11 +0000
(19:42 +0200)
committer
Kay Sievers
<kay@vrfy.org>
Thu, 11 Oct 2012 15:46:43 +0000
(17:46 +0200)
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
gummiboot.c
patch
|
blob
|
history
diff --git
a/gummiboot.c
b/gummiboot.c
index
a65d5ac
..
a13e527
100644
(file)
--- a/
gummiboot.c
+++ b/
gummiboot.c
@@
-1288,6
+1288,9
@@
static VOID config_default_entry_select(Config *config) {
}
config->idx_default_efivar = -1;
+ if (!config->entry_count)
+ return;
+
/*
* Match the pattern from the end of the list to the start, find last
* entry (largest number) matching the given pattern.
@@
-1306,7
+1309,7
@@
static VOID config_default_entry_select(Config *config) {
}
/* select the last entry */
-
if (config->entry_count)
{
+ {
UINTN i;
for (i = config->entry_count-1; i >= 0; i--) {