nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone
Blob Blame History Raw
From 1e5f024ecad805f5abad75459689b1a03ac3da81 Mon Sep 17 00:00:00 2001
From: Vladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Date: Fri, 1 Mar 2013 11:15:09 +0100
Subject: [PATCH 176/482] 	* grub-core/gentrigtables.c: Make tables
 const.

---
 ChangeLog                 | 4 ++++
 grub-core/gentrigtables.c | 2 +-
 include/grub/trig.h       | 4 ++--
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7f5bcfa..fda449d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2013-03-01  Vladimir Serbinenko  <phcoder@gmail.com>
 
+	* grub-core/gentrigtables.c: Make tables const.
+
+2013-03-01  Vladimir Serbinenko  <phcoder@gmail.com>
+
 	Remove nested functions from videoinfo iterators.
 
 2013-03-01  Vladimir Serbinenko  <phcoder@gmail.com>
diff --git a/grub-core/gentrigtables.c b/grub-core/gentrigtables.c
index 8c03957..fface6e 100644
--- a/grub-core/gentrigtables.c
+++ b/grub-core/gentrigtables.c
@@ -40,7 +40,7 @@ main (int argc __attribute__ ((unused)),
   printf ("GRUB_MOD_DUAL_LICENSE (\"Public Domain\");");
 
 #define TAB(op) \
-  printf ("grub_int16_t grub_trig_" #op "tab[] =\n{"); \
+  printf ("const grub_int16_t grub_trig_" #op "tab[] =\n{"); \
   for (i = 0; i < GRUB_TRIG_ANGLE_MAX; i++) \
     { \
       double x = i * 2 * M_PI / GRUB_TRIG_ANGLE_MAX; \
diff --git a/include/grub/trig.h b/include/grub/trig.h
index 2512a5f..f19617c 100644
--- a/include/grub/trig.h
+++ b/include/grub/trig.h
@@ -24,8 +24,8 @@
 #define GRUB_TRIG_ANGLE_MASK 255
 #define GRUB_TRIG_FRACTION_SCALE 16384
 
-extern short grub_trig_sintab[];
-extern short grub_trig_costab[];
+extern const short grub_trig_sintab[];
+extern const short grub_trig_costab[];
 
 static __inline int
 grub_sin (int x)
-- 
1.8.2.1