2005-01-20 Marco Gerards <metgerards@student.han.nl>

* include/grub/mm.h (grub_mm_init_region): Change the type of the
	`unsigned' arguments to `grub_size_t'.
	(grub_malloc): Likewise.
	(grub_realloc): Likewise.
	(grub_memalign): Likewise.
	* kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
	* kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
	* util/misc.c (grub_malloc): Likewise.
	(grub_realloc): Likewise.
	* kern/mm.c (get_header_from_pointer): Change the casts to
	`unsigned' into a cast to `grub_size_t'.

	* fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
	point to `currnode' when `currnode' is changed.

	* util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
	Schottelius <nico-linux@schottelius.org>.
This commit is contained in:
marco_g 2005-01-20 17:25:39 +00:00
parent d0ff18e182
commit 777aff3957
8 changed files with 35 additions and 13 deletions

View file

@ -72,12 +72,12 @@ static grub_mm_region_t base;
static void
get_header_from_pointer (void *ptr, grub_mm_header_t *p, grub_mm_region_t *r)
{
if ((unsigned) ptr & (GRUB_MM_ALIGN - 1))
if ((grub_addr_t) ptr & (GRUB_MM_ALIGN - 1))
grub_fatal ("unaligned pointer %p", ptr);
for (*r = base; *r; *r = (*r)->next)
if ((unsigned) ptr > (*r)->addr
&& (unsigned) ptr <= (*r)->addr + (*r)->size)
if ((grub_addr_t) ptr > (*r)->addr
&& (grub_addr_t) ptr <= (*r)->addr + (*r)->size)
break;
if (! *r)