diff options
author | Andrew Clayton <a.clayton@nginx.com> | 2024-04-22 15:04:29 +0100 |
---|---|---|
committer | Andrew Clayton <a.clayton@nginx.com> | 2024-04-25 15:15:28 +0100 |
commit | b26c119f4e535f617c9ffb10076f15c4ee54414d (patch) | |
tree | dace6467e1c395c039f596d2d8c7d3004f8b34b1 /src/nxt_http.h | |
parent | 31cec908cd9d431eb8632b53b9bbd96caac56bfd (diff) | |
download | unit-b26c119f4e535f617c9ffb10076f15c4ee54414d.tar.gz unit-b26c119f4e535f617c9ffb10076f15c4ee54414d.tar.bz2 |
Tighten up some string arrays
This is the normal way of declaring such things.
Reviewed-by: Zhidao HONG <z.hong@f5.com>
Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to 'src/nxt_http.h')
-rw-r--r-- | src/nxt_http.h | 9 |
1 files changed, 5 insertions, 4 deletions
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", |