strrcmp only performs read access to the memory addressed by its arguments so make them const pointers.
Showing the changes to scripts/basic (1 of 1 file). Show all
Unified · Split
| @@ -251,7 +251,7 @@ static void parse_config_file(const char *map, size_t len) · 250 unmodified lines | |||
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | /* test is s ends in sub */ | 253 | /* test is s ends in sub */ |
| 254 | static int strrcmp(char *s, char *sub) | 254 | static int strrcmp(const char *s, const char *sub) |
| 255 | { | 255 | { |
| 256 | int slen = strlen(s); | 256 | int slen = strlen(s); |
| 257 | int sublen = strlen(sub); | 257 | int sublen = strlen(sub); |