grub2/0264-util-grub-mkfont.c-Prefer-enum-to-define.patch
2013-05-02 16:54:52 -04:00

50 lines
1.3 KiB
Diff

From d01148a183ca591cc2e2c9313f939eb4392d0166 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Fri, 5 Apr 2013 11:13:37 +0200
Subject: [PATCH 264/364] * util/grub-mkfont.c: Prefer enum to #define.
---
ChangeLog | 4 ++++
util/grub-mkfont.c | 11 +++++++----
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index f90fab4..41370a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2013-04-05 Vladimir Serbinenko <phcoder@gmail.com>
+ * util/grub-mkfont.c: Prefer enum to #define.
+
+2013-04-05 Vladimir Serbinenko <phcoder@gmail.com>
+
* grub-core/commands/acpi.c: Use sizeof rather than hardcoding the size.
2013-04-05 Vladimir Serbinenko <phcoder@gmail.com>
diff --git a/util/grub-mkfont.c b/util/grub-mkfont.c
index 83fb2d2..0343fd2 100644
--- a/util/grub-mkfont.c
+++ b/util/grub-mkfont.c
@@ -73,10 +73,13 @@ enum file_formats
WIDTH_SPEC
};
-#define GRUB_FONT_FLAG_BOLD 1
-#define GRUB_FONT_FLAG_NOBITMAP 2
-#define GRUB_FONT_FLAG_NOHINTING 4
-#define GRUB_FONT_FLAG_FORCEHINT 8
+enum
+ {
+ GRUB_FONT_FLAG_BOLD = 1,
+ GRUB_FONT_FLAG_NOBITMAP = 2,
+ GRUB_FONT_FLAG_NOHINTING = 4,
+ GRUB_FONT_FLAG_FORCEHINT = 8
+ };
struct grub_font_info
{
--
1.8.1.4