From 8b8cbdb2ff15c239a07c58e2afbeea90769818d4 Mon Sep 17 00:00:00 2001 From: hollisb Date: Sat, 22 Jan 2005 16:03:15 +0000 Subject: [PATCH] 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'. --- ChangeLog | 5 +++++ disk/powerpc/ieee1275/ofdisk.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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;