1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[gettext] cast

This commit is contained in:
Witold Filipczyk 2022-01-17 16:25:05 +01:00
parent 3dcd66c3db
commit 311909f49a
2 changed files with 4 additions and 4 deletions

View File

@ -205,7 +205,7 @@ set_language(int language)
if (!LANGUAGE) {
/* We never free() this, purely intentionally. */
LANGUAGE = malloc(256);
LANGUAGE = (char *)malloc(256);
}
if (LANGUAGE) {
strcpy(LANGUAGE, language_to_iso639(language));

View File

@ -90,7 +90,7 @@ get_charset_aliases(void)
int add_slash = (dir_len > 0
&& !ISSLASH(dir[dir_len - 1]));
file_name =
(char *) malloc(dir_len + add_slash + base_len +
(char *)malloc(dir_len + add_slash + base_len +
1);
if (file_name != NULL) {
memcpy(file_name, dir, dir_len);
@ -136,11 +136,11 @@ get_charset_aliases(void)
l2 = strlen(buf2);
if (res_size == 0) {
res_size = l1 + 1 + l2 + 1;
res_ptr = malloc(res_size + 1);
res_ptr = (char *)malloc(res_size + 1);
} else {
res_size += l1 + 1 + l2 + 1;
res_ptr =
realloc(res_ptr, res_size + 1);
(char *)realloc(res_ptr, res_size + 1);
}
if (res_ptr == NULL) {
/* Out of memory. */