diff options
| author | Andrew Clayton <andrew@digital-domain.net> | 2022-06-09 22:47:03 +0100 |
|---|---|---|
| committer | Andrew Clayton <andrew@digital-domain.net> | 2022-06-15 21:14:37 +0100 |
| commit | d6170d4c459fc90432dbd2a04ed9f02fa1353626 (patch) | |
| tree | fbf58e6a00f7615d7f818f849b8d91f607ba2d39 /src/nxt_time_parse.c | |
| parent | 6a8081d71e805b12d0f7fd32ce72d60babadfc85 (diff) | |
| download | unit-archive/constVariable.tar.gz unit-archive/constVariable.tar.bz2 | |
Marked a couple of variables 'const'.archive/constVariable
As was pointed out by the cppcheck[0] static code analysis utility we
can mark a couple of variables as 'const'. This acts 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.c | 2 |
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 }; |
