2005-01-22 Hollis Blanchard <hollis@penguinppc.org>

* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
	`devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
This commit is contained in:
hollisb 2005-01-22 16:03:15 +00:00
parent e3741a2734
commit 8b8cbdb2ff
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2005-01-22 Hollis Blanchard <hollis@penguinppc.org>
* disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
`devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'.
2005-01-22 Marco Gerards <metgerards@student.han.nl>
* kern/misc.c (grub_strndup): Function rewritten.

View File

@ -50,12 +50,12 @@ grub_ofdisk_open (const char *name, grub_disk_t disk)
{
grub_ieee1275_phandle_t dev;
grub_ieee1275_ihandle_t dev_ihandle = 0;
char *devpath = 0;
char *devpath;
/* XXX: This should be large enough for any possible case. */
char prop[64];
int actual;
devpath = grub_strndup (name, grub_strlen (devpath) + 2);
devpath = grub_strndup (name, grub_strlen (name) + 2);
if (! devpath)
return grub_errno;