2009-11-09 Robert Millan <rmh.grub@aybabtu.com>

Misc cleanup.

        * kern/command.c (grub_register_command_prio): Use
        grub_zalloc() instead of explicitly zeroing data.
        * kern/list.c: Include `<grub/mm.h>'.
        (grub_named_list_find): Replace `0' with `NULL'.
        * normal/autofs.c (struct grub_fs_module_list): Remove ad-hoc type.
        (fs_module_list): Change type to `grub_named_list_t'.  Update all
        users.
        * normal/dyncmd.c (read_command_list): Add space between function
        call and parenthesis.
        * normal/handler.c (read_handler_list): Likewise.
This commit is contained in:
Robert Millan 2009-11-09 14:45:28 +00:00
parent 4089b167cd
commit ac451143b2
6 changed files with 24 additions and 16 deletions

View file

@ -31,7 +31,7 @@ grub_register_command_prio (const char *name,
{
grub_command_t cmd;
cmd = (grub_command_t) grub_malloc (sizeof (*cmd));
cmd = (grub_command_t) grub_zalloc (sizeof (*cmd));
if (! cmd)
return 0;
@ -42,7 +42,6 @@ grub_register_command_prio (const char *name,
cmd->flags = GRUB_COMMAND_FLAG_BOTH;
cmd->prio = prio;
cmd->data = 0;
grub_prio_list_insert (GRUB_AS_PRIO_LIST_P (&grub_command_list),
GRUB_AS_PRIO_LIST (cmd));