mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
asprintf and snprintf support
This commit is contained in:
1 parent
c181849b95
commit
8b442f3f4c
60 files changed
+396
-345
No files matched your search
@@ -52,12 +52,10 @@ grub_xnu_set_video (struct grub_xnu_boot_params *params)
|
||||
err = grub_video_set_mode (DEFAULT_VIDEO_MODE, video_hook);
|
||||
else
|
||||
{
|
||||
tmp = grub_malloc (grub_strlen (modevar)
|
||||
+ sizeof (DEFAULT_VIDEO_MODE) + 1);
|
||||
tmp = grub_asprintf ("%s;" DEFAULT_VIDEO_MODE, modevar);
|
||||
if (! tmp)
|
||||
return grub_error (GRUB_ERR_OUT_OF_MEMORY,
|
||||
"couldn't allocate temporary storag");
|
||||
grub_sprintf (tmp, "%s;" DEFAULT_VIDEO_MODE, modevar);
|
||||
err = grub_video_set_mode (tmp, video_hook);
|
||||
grub_free (tmp);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user