diff --git a/ChangeLog b/ChangeLog index e6f78a3d6..1df87459e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-11-03 Hollis Blanchard + + * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use + `grub_strndup' to drop device arguments. Replace unnecessary + `grub_strndup' with `grub_strdup'. + 2005-11-03 Hollis Blanchard * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the diff --git a/kern/powerpc/ieee1275/openfw.c b/kern/powerpc/ieee1275/openfw.c index 115af9762..39195ce16 100644 --- a/kern/powerpc/ieee1275/openfw.c +++ b/kern/powerpc/ieee1275/openfw.c @@ -231,7 +231,7 @@ grub_ieee1275_get_devname (const char *path) /* briQ firmware can change capitalization in /chosen/bootpath. */ if (! grub_strncasecmp (curalias->path, path, pathlen)) { - newpath = grub_strndup (curalias->name, grub_strlen (curalias->name)); + newpath = grub_strdup (curalias->name); return 1; } @@ -245,7 +245,7 @@ grub_ieee1275_get_devname (const char *path) grub_devalias_iterate (match_alias); if (! newpath) - newpath = grub_strdup (path); + newpath = grub_strndup (path, pathlen); return newpath; }