mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-26 09:10:53 +00:00
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:
1 parent
48b391e9ab
commit
87edb8940a
27 files changed
+111
-75
No files matched your search
+2
-2
@@ -25,6 +25,7 @@
|
||||
struct grub_net_udp_socket
|
||||
{
|
||||
struct grub_net_udp_socket *next;
|
||||
struct grub_net_udp_socket **prev;
|
||||
|
||||
enum { GRUB_NET_SOCKET_START,
|
||||
GRUB_NET_SOCKET_ESTABLISHED,
|
||||
@@ -53,8 +54,7 @@ udp_socket_register (grub_net_udp_socket_t sock)
|
||||
void
|
||||
grub_net_udp_close (grub_net_udp_socket_t sock)
|
||||
{
|
||||
grub_list_remove (GRUB_AS_LIST_P (&udp_sockets),
|
||||
GRUB_AS_LIST (sock));
|
||||
grub_list_remove (GRUB_AS_LIST (sock));
|
||||
grub_free (sock);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user