Blame SOURCES/0297-font-Remove-grub_font_dup_glyph.patch

a46852
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
a46852
From: Zhang Boyang <zhangboyang.id@gmail.com>
a46852
Date: Fri, 5 Aug 2022 02:13:29 +0800
a46852
Subject: [PATCH] font: Remove grub_font_dup_glyph()
a46852
a46852
Remove grub_font_dup_glyph() since nobody is using it since 2013, and
a46852
I'm too lazy to fix the integer overflow problem in it.
a46852
a46852
Signed-off-by: Zhang Boyang <zhangboyang.id@gmail.com>
a46852
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
a46852
(cherry picked from commit 25ad31c19c331aaa2dbd9bd2b2e2655de5766a9d)
a46852
(cherry picked from commit ad950e1e033318bb50222ed268a6dcfb97389035)
a46852
---
a46852
 grub-core/font/font.c | 14 --------------
a46852
 1 file changed, 14 deletions(-)
a46852
a46852
diff --git a/grub-core/font/font.c b/grub-core/font/font.c
a46852
index 1fa181d4ca..a115a63b0c 100644
a46852
--- a/grub-core/font/font.c
a46852
+++ b/grub-core/font/font.c
a46852
@@ -1055,20 +1055,6 @@ grub_font_get_glyph_with_fallback (grub_font_t font, grub_uint32_t code)
a46852
   return best_glyph;
a46852
 }
a46852
 
a46852
-#if 0
a46852
-static struct grub_font_glyph *
a46852
-grub_font_dup_glyph (struct grub_font_glyph *glyph)
a46852
-{
a46852
-  static struct grub_font_glyph *ret;
a46852
-  ret = grub_malloc (sizeof (*ret) + (glyph->width * glyph->height + 7) / 8);
a46852
-  if (!ret)
a46852
-    return NULL;
a46852
-  grub_memcpy (ret, glyph, sizeof (*ret)
a46852
-	       + (glyph->width * glyph->height + 7) / 8);
a46852
-  return ret;
a46852
-}
a46852
-#endif
a46852
-
a46852
 /* FIXME: suboptimal.  */
a46852
 static void
a46852
 grub_font_blit_glyph (struct grub_font_glyph *target,