Replace single-linked with double-linked lists. It results in more
compact and more efficient code. * grub-core/kern/list.c (grub_list_push): Moved from here ... * include/grub/list.h (grub_list_push): ... to here. Set prev. (grub_list_remove): Moved from here ... * include/grub/list.h (grub_list_remove): ... here. Use and set prev. (grub_prio_list_insert): Set prev. * include/grub/list.h (grub_list): Add prev. All users updated.
This commit is contained in:
parent
48b391e9ab
commit
87edb8940a
27 changed files with 111 additions and 75 deletions
|
@ -24,6 +24,7 @@ struct grub_test_failure
|
|||
{
|
||||
/* The next failure. */
|
||||
struct grub_test_failure *next;
|
||||
struct grub_test_failure **prev;
|
||||
|
||||
/* The test source file name. */
|
||||
char *file;
|
||||
|
@ -124,7 +125,7 @@ grub_test_unregister (const char *name)
|
|||
|
||||
if (test)
|
||||
{
|
||||
grub_list_remove (GRUB_AS_LIST_P (&grub_test_list), GRUB_AS_LIST (test));
|
||||
grub_list_remove (GRUB_AS_LIST (test));
|
||||
|
||||
if (test->name)
|
||||
grub_free (test->name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue