mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
[gettext] cast
This commit is contained in:
parent
3dcd66c3db
commit
311909f49a
@ -205,7 +205,7 @@ set_language(int language)
|
|||||||
|
|
||||||
if (!LANGUAGE) {
|
if (!LANGUAGE) {
|
||||||
/* We never free() this, purely intentionally. */
|
/* We never free() this, purely intentionally. */
|
||||||
LANGUAGE = malloc(256);
|
LANGUAGE = (char *)malloc(256);
|
||||||
}
|
}
|
||||||
if (LANGUAGE) {
|
if (LANGUAGE) {
|
||||||
strcpy(LANGUAGE, language_to_iso639(language));
|
strcpy(LANGUAGE, language_to_iso639(language));
|
||||||
|
@ -90,7 +90,7 @@ get_charset_aliases(void)
|
|||||||
int add_slash = (dir_len > 0
|
int add_slash = (dir_len > 0
|
||||||
&& !ISSLASH(dir[dir_len - 1]));
|
&& !ISSLASH(dir[dir_len - 1]));
|
||||||
file_name =
|
file_name =
|
||||||
(char *) malloc(dir_len + add_slash + base_len +
|
(char *)malloc(dir_len + add_slash + base_len +
|
||||||
1);
|
1);
|
||||||
if (file_name != NULL) {
|
if (file_name != NULL) {
|
||||||
memcpy(file_name, dir, dir_len);
|
memcpy(file_name, dir, dir_len);
|
||||||
@ -136,11 +136,11 @@ get_charset_aliases(void)
|
|||||||
l2 = strlen(buf2);
|
l2 = strlen(buf2);
|
||||||
if (res_size == 0) {
|
if (res_size == 0) {
|
||||||
res_size = l1 + 1 + l2 + 1;
|
res_size = l1 + 1 + l2 + 1;
|
||||||
res_ptr = malloc(res_size + 1);
|
res_ptr = (char *)malloc(res_size + 1);
|
||||||
} else {
|
} else {
|
||||||
res_size += l1 + 1 + l2 + 1;
|
res_size += l1 + 1 + l2 + 1;
|
||||||
res_ptr =
|
res_ptr =
|
||||||
realloc(res_ptr, res_size + 1);
|
(char *)realloc(res_ptr, res_size + 1);
|
||||||
}
|
}
|
||||||
if (res_ptr == NULL) {
|
if (res_ptr == NULL) {
|
||||||
/* Out of memory. */
|
/* Out of memory. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user