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/
This commit is contained in:
committed by
Alejandro Colomar
parent
4418f99cd4
commit
29c7208526
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user