2005-11-03 Hollis Blanchard <hollis@penguinppc.org>

* kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
	`grub_strndup' to drop device arguments. Replace unnecessary
	`grub_strndup' with `grub_strdup'.
This commit is contained in:
hollisb 2005-11-04 03:18:12 +00:00
parent 4ce3261934
commit e45deb9e1e
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
* 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 <hollis@penguinppc.org> 2005-11-03 Hollis Blanchard <hollis@penguinppc.org>
* kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the

View file

@ -231,7 +231,7 @@ grub_ieee1275_get_devname (const char *path)
/* briQ firmware can change capitalization in /chosen/bootpath. */ /* briQ firmware can change capitalization in /chosen/bootpath. */
if (! grub_strncasecmp (curalias->path, path, pathlen)) if (! grub_strncasecmp (curalias->path, path, pathlen))
{ {
newpath = grub_strndup (curalias->name, grub_strlen (curalias->name)); newpath = grub_strdup (curalias->name);
return 1; return 1;
} }
@ -245,7 +245,7 @@ grub_ieee1275_get_devname (const char *path)
grub_devalias_iterate (match_alias); grub_devalias_iterate (match_alias);
if (! newpath) if (! newpath)
newpath = grub_strdup (path); newpath = grub_strndup (path, pathlen);
return newpath; return newpath;
} }