diff --git a/src/config/config.c b/src/config/config.c index 2055b83cbe..27a047048e 100644 --- a/src/config/config.c +++ b/src/config/config.c @@ -23,7 +23,7 @@ #include #include -#define DEFAULTS_ZERO (u16*)0x01 +#define DEFAULTS_ZERO (const u16*)0x01 #define MATCH_KEY(s) strcasecmp(name, s) == 0 #define MATCH_VALUE(s) strcasecmp(value, s) == 0 @@ -158,7 +158,7 @@ int assign_int(void* ptr, const struct struct_map *map, int map_size, const char return 0; } -int write_int2(void* ptr, const struct struct_map *map, u16* defaults, int map_size, FILE* fh) { +int write_int2(void* ptr, const struct struct_map *map, const u16* defaults, int map_size, FILE* fh) { for (int i = 0; i < map_size; i++) { int size = map[i].offset >> 12; int offset = map[i].offset & 0xFFF; diff --git a/src/config/config.h b/src/config/config.h index 14abfeae8a..c7edd6cb7a 100644 --- a/src/config/config.h +++ b/src/config/config.h @@ -51,6 +51,6 @@ int assign_int(void* ptr, const struct struct_map *map, int map_size, const char* name, const char* value); int write_int(void* ptr, const struct struct_map *map, int map_size, FILE* fh); -int write_int2(void* ptr, const struct struct_map *map, u16* defaults, int map_size, FILE* fh); +int write_int2(void* ptr, const struct struct_map *map, const u16* defaults, int map_size, FILE* fh); #endif