summaryrefslogtreecommitdiff
path: root/time.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-22 00:40:11 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-22 00:40:11 +0000
commit8a6c76b5105e15d3d363218d094066afe87d45c5 (patch)
tree4affde4a5cb835bef9e9314e8883c7fa231faca6 /time.c
parent96240fa422c6e2122fd4a5cae776d3e241e6e255 (diff)
time.c: constify compat_* tables
compat_common_month_table and compat_leap_month_table should not be writable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'time.c')
-rw-r--r--time.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/time.c b/time.c
index 2b5721898c..0e1eb0a014 100644
--- a/time.c
+++ b/time.c
@@ -1211,7 +1211,7 @@ static struct tm *localtime_with_gmtoff_zone(const time_t *t, struct tm *result,
* }
*
*/
-static int compat_common_month_table[12][7] = {
+static const int compat_common_month_table[12][7] = {
/* Sun Mon Tue Wed Thu Fri Sat */
{ 2034, 2035, 2036, 2031, 2032, 2027, 2033 }, /* January */
{ 2026, 2027, 2033, 2034, 2035, 2030, 2031 }, /* February */
@@ -1252,7 +1252,7 @@ static int compat_common_month_table[12][7] = {
* puts
* }
*/
-static int compat_leap_month_table[7] = {
+static const int compat_leap_month_table[7] = {
/* Sun Mon Tue Wed Thu Fri Sat */
2032, 2016, 2028, 2012, 2024, 2036, 2020, /* February */
};