summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_time_parse.c
diff options
context:
space:
mode:
authorAndrew Clayton <andrew@digital-domain.net>2022-06-16 02:00:53 +0100
committerAlejandro Colomar <alx.manpages@gmail.com>2022-06-22 00:30:44 +0200
commit29c72085262073dc5dec1ecbde1d520da9763746 (patch)
treed65daca88671c6fd7f75fccf1711d0761a9f77b3 /src/nxt_time_parse.c
parent4418f99cd46b17be893b6bd0df56434078e5aad3 (diff)
downloadunit-29c72085262073dc5dec1ecbde1d520da9763746.tar.gz
unit-29c72085262073dc5dec1ecbde1d520da9763746.tar.bz2
Marked a couple of variables 'const'.
As was pointed out by the cppcheck[0] static code analysis utility we can mark a couple of variables as 'const'. This acts as a hint to the compiler about our intentions and the compiler will tell us when we deviate from them. [0]: https://cppcheck.sourceforge.io/
Diffstat (limited to '')
-rw-r--r--src/nxt_time_parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_time_parse.c b/src/nxt_time_parse.c
index 94c43289..63620b09 100644
--- a/src/nxt_time_parse.c
+++ b/src/nxt_time_parse.c
@@ -22,7 +22,7 @@ nxt_time_parse(const u_char *p, size_t len)
nxt_uint_t year, days;
const u_char *end;
- static nxt_int_t mday[12] = {
+ static const nxt_int_t mday[12] = {
31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
};