1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

const: static array

Such array can be stored  in   .rodata   section.
This commit is contained in:
Zdenek Kabelac 2024-05-03 19:43:33 +02:00
parent acabc995c0
commit abf7c40185
3 changed files with 3 additions and 3 deletions

View File

@ -2867,7 +2867,7 @@ static const char *_out_of_range_msg = "Field selection value %s out of supporte
#define DELIM_DATE '-' #define DELIM_DATE '-'
#define DELIM_TIME ':' #define DELIM_TIME ':'
static int _days_in_month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; static const int _days_in_month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
static int _is_leap_year(long year) static int _is_leap_year(long year)
{ {

View File

@ -851,7 +851,7 @@ static void _adjust_time_for_granularity(struct time_info *info, struct tm *tm,
#define SECS_PER_HOUR 3600 #define SECS_PER_HOUR 3600
#define SECS_PER_DAY ((time_t)86400) #define SECS_PER_DAY ((time_t)86400)
static int _days_in_month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; static const int _days_in_month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
static int _is_leap_year(long year) static int _is_leap_year(long year)
{ {

View File

@ -2865,7 +2865,7 @@ static const char *_out_of_range_msg = "Field selection value %s out of supporte
#define DELIM_DATE '-' #define DELIM_DATE '-'
#define DELIM_TIME ':' #define DELIM_TIME ':'
static int _days_in_month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; static const int _days_in_month[12] = {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
static int _is_leap_year(long year) static int _is_leap_year(long year)
{ {