declare static arrays const where possible
Some static arrays that could be readonly memory were declared mutable.
This commit is contained in:
1 parent
bc96146825
commit
b6da71bf68
3 files changed
+10
-10
No files matched your search
+1
-1
@@ -1463,7 +1463,7 @@ static jv f_strptime(jq_state *jq, jv a, jv b) {
|
||||
|
||||
static int jv2tm(jv a, struct tm *tm) {
|
||||
memset(tm, 0, sizeof(*tm));
|
||||
static size_t offsets[] = {
|
||||
static const size_t offsets[] = {
|
||||
offsetof(struct tm, tm_year),
|
||||
offsetof(struct tm, tm_mon),
|
||||
offsetof(struct tm, tm_mday),
|
||||
|
||||
Reference in new issue
Block a user