nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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