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