summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nxt_controller.c9
-rw-r--r--src/nxt_http.h9
-rw-r--r--src/nxt_http_variables.c5
3 files changed, 13 insertions, 10 deletions
diff --git a/src/nxt_controller.c b/src/nxt_controller.c
index 230a4d5d..30d5f04e 100644
--- a/src/nxt_controller.c
+++ b/src/nxt_controller.c
@@ -2652,11 +2652,12 @@ static u_char *
nxt_controller_date(u_char *buf, nxt_realtime_t *now, struct tm *tm,
size_t size, const char *format)
{
- static const char *week[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri",
- "Sat" };
+ static const char * const week[] = { "Sun", "Mon", "Tue", "Wed", "Thu",
+ "Fri", "Sat" };
- static const char *month[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
+ static const char * const month[] = { "Jan", "Feb", "Mar", "Apr", "May",
+ "Jun", "Jul", "Aug", "Sep", "Oct",
+ "Nov", "Dec" };
return nxt_sprintf(buf, buf + size, format,
week[tm->tm_wday], tm->tm_mday,
diff --git a/src/nxt_http.h b/src/nxt_http.h
index 23d86b91..5fab5c67 100644
--- a/src/nxt_http.h
+++ b/src/nxt_http.h
@@ -305,11 +305,12 @@ struct nxt_http_forward_s {
nxt_inline u_char *
nxt_http_date(u_char *buf, struct tm *tm)
{
- static const char *week[] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri",
- "Sat" };
+ static const char * const week[] = { "Sun", "Mon", "Tue", "Wed", "Thu",
+ "Fri", "Sat" };
- static const char *month[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
+ static const char * const month[] = { "Jan", "Feb", "Mar", "Apr", "May",
+ "Jun", "Jul", "Aug", "Sep", "Oct",
+ "Nov", "Dec" };
return nxt_sprintf(buf, buf + NXT_HTTP_DATE_LEN,
"%s, %02d %s %4d %02d:%02d:%02d GMT",
diff --git a/src/nxt_http_variables.c b/src/nxt_http_variables.c
index 85ae6004..3a1746b3 100644
--- a/src/nxt_http_variables.c
+++ b/src/nxt_http_variables.c
@@ -366,8 +366,9 @@ nxt_http_log_date(u_char *buf, nxt_realtime_t *now, struct tm *tm,
u_char sign;
time_t gmtoff;
- static const char *month[] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",
- "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" };
+ static const char * const month[] = { "Jan", "Feb", "Mar", "Apr", "May",
+ "Jun", "Jul", "Aug", "Sep", "Oct",
+ "Nov", "Dec" };
gmtoff = nxt_timezone(tm) / 60;