From: hollisb Date: Sat, 22 Jan 2005 16:03:15 +0000 (+0000) Subject: 2005-01-22 Hollis Blanchard X-Git-Tag: 1.98~2159 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b8cbdb2ff15c239a07c58e2afbeea90769818d4;p=thirdparty%2Fgrub.git 2005-01-22 Hollis Blanchard * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize `devpath' to 0. Use `name' instead of `devpath' with `grub_strndup'. --- diff --git a/ChangeLog b/ChangeLog index bcca1f81d..d68d9e9d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-01-22 Hollis Blanchard + + * 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 * kern/misc.c (grub_strndup): Function rewritten. diff --git a/disk/powerpc/ieee1275/ofdisk.c b/disk/powerpc/ieee1275/ofdisk.c index 6a8ed816f..344f03daa 100644 --- a/disk/powerpc/ieee1275/ofdisk.c +++ b/disk/powerpc/ieee1275/ofdisk.c @@ -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;