1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-06 09:26:44 +02:00

cleanup: Avoid casting away constness from pointers.

This commit is contained in:
iphydf
2021-12-11 22:18:43 +00:00
parent 1cace1e81d
commit 71f6a8d4d6
5 changed files with 20 additions and 17 deletions

View File

@ -288,7 +288,7 @@ int qsort_strcasecmp_hlpr(const void *str1, const void *str2)
/* case-insensitive string compare function for use with qsort */
int qsort_ptr_char_array_helper(const void *str1, const void *str2)
{
return strcasecmp(*(char **)str1, *(char **)str2);
return strcasecmp(*(const char *const *)str1, *(const char *const *)str2);
}
static const char invalid_chars[] = {'/', '\n', '\t', '\v', '\r', '\0'};