Use strcpy_literal in more places

This commit is contained in:
twinaphex 2020-09-19 23:59:06 +02:00
parent 1296fc4745
commit 0e49f058f3
9 changed files with 68 additions and 68 deletions

View File

@ -1025,9 +1025,9 @@ static void gfx_widgets_draw_task_msg(
if (msg->task_finished) if (msg->task_finished)
{ {
if (msg->task_error) if (msg->task_error)
strlcpy(task_percentage, "Task failed", sizeof(task_percentage)); strcpy_literal(task_percentage, "Task failed");
else else
strlcpy(task_percentage, " ", sizeof(task_percentage)); strcpy_literal(task_percentage, " ");
} }
else if (msg->task_progress >= 0 && msg->task_progress <= 100) else if (msg->task_progress >= 0 && msg->task_progress <= 100)
snprintf(task_percentage, sizeof(task_percentage), snprintf(task_percentage, sizeof(task_percentage),

View File

@ -437,8 +437,7 @@ bool gfx_widget_start_load_content_animation(void)
sizeof(state->system_name)); sizeof(state->system_name));
/* Otherwise, just use 'RetroArch' as a fallback */ /* Otherwise, just use 'RetroArch' as a fallback */
else else
strlcpy(state->system_name, "RetroArch", strcpy_literal(state->system_name, "RetroArch");
sizeof(state->system_name));
} }
/* > Content name has been determined /* > Content name has been determined
@ -503,8 +502,7 @@ bool gfx_widget_start_load_content_animation(void)
state->icon_file[0] = '\0'; state->icon_file[0] = '\0';
icon_path[0] = '\0'; icon_path[0] = '\0';
strlcpy(state->icon_file, "retroarch.png", strcpy_literal(state->icon_file, "retroarch.png");
sizeof(state->icon_file));
fill_pathname_join(icon_path, fill_pathname_join(icon_path,
state->icon_directory, state->icon_file, state->icon_directory, state->icon_file,

View File

@ -1010,7 +1010,7 @@ void fill_pathname_expand_special(char *out_path,
retro_assert(src_size < size); retro_assert(src_size < size);
out_path += src_size; out_path += src_size;
size -= src_size; size -= src_size;
} }
in_path += 2; in_path += 2;
@ -1100,8 +1100,7 @@ void fill_pathname_abbreviate_special(char *out_path,
if (!PATH_CHAR_IS_SLASH(*in_path)) if (!PATH_CHAR_IS_SLASH(*in_path))
{ {
retro_assert(strlcpy(out_path, strcpy_literal(out_path, PATH_DEFAULT_SLASH());
PATH_DEFAULT_SLASH(), size) < size);
out_path++; out_path++;
size--; size--;
} }

View File

@ -352,7 +352,7 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
* but I have not seen any real examples of them. */ * but I have not seen any real examples of them. */
info->system_id = MEDIA_CD_SYSTEM_MEGA_CD; info->system_id = MEDIA_CD_SYSTEM_MEGA_CD;
strlcpy(info->system, "Sega CD / Mega CD", sizeof(info->system)); strcpy_literal(info->system, "Sega CD / Mega CD");
title_pos = buf + offset + 0x150; title_pos = buf + offset + 0x150;
@ -362,7 +362,7 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
media_zero_trailing_spaces(info->title, sizeof(info->title)); media_zero_trailing_spaces(info->title, sizeof(info->title));
} }
else else
strlcpy(info->title, "N/A", sizeof(info->title)); strcpy_literal(info->title, "N/A");
serial_pos = buf + offset + 0x183; serial_pos = buf + offset + 0x183;
@ -372,7 +372,7 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
media_zero_trailing_spaces(info->serial, sizeof(info->serial)); media_zero_trailing_spaces(info->serial, sizeof(info->serial));
} }
else else
strlcpy(info->serial, "N/A", sizeof(info->serial)); strcpy_literal(info->serial, "N/A");
} }
else if (!memcmp(buf + offset, "SEGA SEGASATURN", else if (!memcmp(buf + offset, "SEGA SEGASATURN",
STRLEN_CONST("SEGA SEGASATURN"))) STRLEN_CONST("SEGA SEGASATURN")))
@ -387,7 +387,7 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
info->system_id = MEDIA_CD_SYSTEM_SATURN; info->system_id = MEDIA_CD_SYSTEM_SATURN;
strlcpy(info->system, "Sega Saturn", sizeof(info->system)); strcpy_literal(info->system, "Sega Saturn");
title_pos = buf + offset + 0x60; title_pos = buf + offset + 0x60;
@ -397,7 +397,7 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
media_zero_trailing_spaces(info->title, sizeof(info->title)); media_zero_trailing_spaces(info->title, sizeof(info->title));
} }
else else
strlcpy(info->title, "N/A", sizeof(info->title)); strcpy_literal(info->title, "N/A");
serial_pos = buf + offset + 0x20; serial_pos = buf + offset + 0x20;
@ -407,7 +407,7 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
media_zero_trailing_spaces(info->serial, sizeof(info->serial)); media_zero_trailing_spaces(info->serial, sizeof(info->serial));
} }
else else
strlcpy(info->serial, "N/A", sizeof(info->serial)); strcpy_literal(info->serial, "N/A");
version_pos = buf + offset + 0x2a; version_pos = buf + offset + 0x2a;
@ -417,7 +417,7 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
media_zero_trailing_spaces(info->version, sizeof(info->version)); media_zero_trailing_spaces(info->version, sizeof(info->version));
} }
else else
strlcpy(info->version, "N/A", sizeof(info->version)); strcpy_literal(info->version, "N/A");
release_date_pos = buf + offset + 0x30; release_date_pos = buf + offset + 0x30;
@ -427,7 +427,7 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
media_zero_trailing_spaces(info->release_date, sizeof(info->release_date)); media_zero_trailing_spaces(info->release_date, sizeof(info->release_date));
} }
else else
strlcpy(info->release_date, "N/A", sizeof(info->release_date)); strcpy_literal(info->release_date, "N/A");
} }
else if (!memcmp(buf + offset, "SEGA SEGAKATANA", STRLEN_CONST("SEGA SEGAKATANA"))) else if (!memcmp(buf + offset, "SEGA SEGAKATANA", STRLEN_CONST("SEGA SEGAKATANA")))
{ {
@ -441,7 +441,7 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
info->system_id = MEDIA_CD_SYSTEM_DREAMCAST; info->system_id = MEDIA_CD_SYSTEM_DREAMCAST;
strlcpy(info->system, "Sega Dreamcast", sizeof(info->system)); strcpy_literal(info->system, "Sega Dreamcast");
title_pos = buf + offset + 0x80; title_pos = buf + offset + 0x80;
@ -451,7 +451,7 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
media_zero_trailing_spaces(info->title, sizeof(info->title)); media_zero_trailing_spaces(info->title, sizeof(info->title));
} }
else else
strlcpy(info->title, "N/A", sizeof(info->title)); strcpy_literal(info->title, "N/A");
serial_pos = buf + offset + 0x40; serial_pos = buf + offset + 0x40;
@ -461,7 +461,7 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
media_zero_trailing_spaces(info->serial, sizeof(info->serial)); media_zero_trailing_spaces(info->serial, sizeof(info->serial));
} }
else else
strlcpy(info->serial, "N/A", sizeof(info->serial)); strcpy_literal(info->serial, "N/A");
version_pos = buf + offset + 0x4a; version_pos = buf + offset + 0x4a;
@ -471,7 +471,7 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
media_zero_trailing_spaces(info->version, sizeof(info->version)); media_zero_trailing_spaces(info->version, sizeof(info->version));
} }
else else
strlcpy(info->version, "N/A", sizeof(info->version)); strcpy_literal(info->version, "N/A");
release_date_pos = buf + offset + 0x50; release_date_pos = buf + offset + 0x50;
@ -481,7 +481,7 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
media_zero_trailing_spaces(info->release_date, sizeof(info->release_date)); media_zero_trailing_spaces(info->release_date, sizeof(info->release_date));
} }
else else
strlcpy(info->release_date, "N/A", sizeof(info->release_date)); strcpy_literal(info->release_date, "N/A");
} }
/* Primary Volume Descriptor fields of ISO9660 */ /* Primary Volume Descriptor fields of ISO9660 */
else if (!memcmp(buf + offset + (16 * sector_size), "\1CD001\1\0PLAYSTATION", 19)) else if (!memcmp(buf + offset + (16 * sector_size), "\1CD001\1\0PLAYSTATION", 19))
@ -493,7 +493,7 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
info->system_id = MEDIA_CD_SYSTEM_PSX; info->system_id = MEDIA_CD_SYSTEM_PSX;
strlcpy(info->system, "Sony PlayStation", sizeof(info->system)); strcpy_literal(info->system, "Sony PlayStation");
title_pos = buf + offset + (16 * sector_size) + 40; title_pos = buf + offset + (16 * sector_size) + 40;
@ -503,19 +503,19 @@ bool media_detect_cd_info(const char *path, uint64_t pregap_bytes, media_detect_
media_zero_trailing_spaces(info->title, sizeof(info->title)); media_zero_trailing_spaces(info->title, sizeof(info->title));
} }
else else
strlcpy(info->title, "N/A", sizeof(info->title)); strcpy_literal(info->title, "N/A");
} }
else if (!memcmp(buf + offset, "\x01\x5a\x5a\x5a\x5a\x5a\x01\x00\x00\x00\x00\x00", 12)) else if (!memcmp(buf + offset, "\x01\x5a\x5a\x5a\x5a\x5a\x01\x00\x00\x00\x00\x00", 12))
{ {
info->system_id = MEDIA_CD_SYSTEM_3DO; info->system_id = MEDIA_CD_SYSTEM_3DO;
strlcpy(info->system, "3DO", sizeof(info->system)); strcpy_literal(info->system, "3DO");
} }
else if (!memcmp(buf + offset + 0x950, "PC Engine CD-ROM SYSTEM", 23)) else if (!memcmp(buf + offset + 0x950, "PC Engine CD-ROM SYSTEM", 23))
{ {
info->system_id = MEDIA_CD_SYSTEM_PC_ENGINE_CD; info->system_id = MEDIA_CD_SYSTEM_PC_ENGINE_CD;
strlcpy(info->system, "TurboGrafx-CD / PC-Engine CD", sizeof(info->system)); strcpy_literal(info->system, "TurboGrafx-CD / PC-Engine CD");
} }
free(buf); free(buf);

View File

@ -412,7 +412,7 @@ static void menu_action_setting_disp_set_label_menu_file_core(
char *s2, size_t len2) char *s2, size_t len2)
{ {
const char *alt = NULL; const char *alt = NULL;
strlcpy(s, "(CORE)", len); strcpy_literal(s, "(CORE)");
menu_entries_get_at_offset(list, i, NULL, menu_entries_get_at_offset(list, i, NULL,
NULL, NULL, NULL, &alt); NULL, NULL, NULL, &alt);
@ -463,12 +463,12 @@ static void menu_action_setting_disp_set_label_core_updater_entry(
/* Highlight locked cores */ /* Highlight locked cores */
if (core_info.inf->is_locked) if (core_info.inf->is_locked)
{ {
strlcpy(s, "[#!]", len); strcpy_literal(s, "[#!]");
*w = (unsigned)STRLEN_CONST("[#!]"); *w = (unsigned)STRLEN_CONST("[#!]");
} }
else else
{ {
strlcpy(s, "[#]", len); strcpy_literal(s, "[#]");
*w = (unsigned)STRLEN_CONST("[#]"); *w = (unsigned)STRLEN_CONST("[#]");
} }
} }
@ -506,7 +506,7 @@ static void menu_action_setting_disp_set_label_core_manager_entry(
if (core_info_find(&core_info) && if (core_info_find(&core_info) &&
core_info.inf->is_locked) core_info.inf->is_locked)
{ {
strlcpy(s, "[!]", len); strcpy_literal(s, "[!]");
*w = (unsigned)STRLEN_CONST("[!]"); *w = (unsigned)STRLEN_CONST("[!]");
} }
} }
@ -571,7 +571,7 @@ static void menu_action_setting_disp_set_label_input_desc(
descriptor = descriptor =
runloop_get_system_info()->input_desc_btn[user_idx][remap_idx]; runloop_get_system_info()->input_desc_btn[user_idx][remap_idx];
strlcpy(s, "---", len); strcpy_literal(s, "---");
if (!string_is_empty(descriptor)) if (!string_is_empty(descriptor))
{ {
@ -622,7 +622,7 @@ static void menu_action_setting_disp_set_label_input_desc_kbd(
strlcpy(s, desc, len); strlcpy(s, desc, len);
} }
else else
strlcpy(s, "---", len); strcpy_literal(s, "---");
*w = 19; *w = 19;
strlcpy(s2, path, len2); strlcpy(s2, path, len2);
@ -885,7 +885,7 @@ static void menu_action_setting_disp_set_label_menu_video_resolution(
{ {
#ifdef GEKKO #ifdef GEKKO
if (width == 0 || height == 0) if (width == 0 || height == 0)
strlcpy(s, "DEFAULT", len); strcpy_literal(s, "DEFAULT");
else else
#endif #endif
snprintf(s, len, "%ux%u", width, height); snprintf(s, len, "%ux%u", width, height);
@ -1130,10 +1130,10 @@ static void menu_action_setting_disp_set_label_core_option_create(
*s = '\0'; *s = '\0';
*w = 19; *w = 19;
strlcpy(s, "", len); strcpy_literal(s, "");
if (!string_is_empty(path_get(RARCH_PATH_BASENAME))) if (!string_is_empty(path_get(RARCH_PATH_BASENAME)))
strlcpy(s, path_basename(path_get(RARCH_PATH_BASENAME)), len); strlcpy(s, path_basename(path_get(RARCH_PATH_BASENAME)), len);
strlcpy(s2, path, len2); strlcpy(s2, path, len2);
} }

View File

@ -4574,7 +4574,7 @@ static int action_ok_download_generic(const char *path,
path = "shaders_cg.zip"; path = "shaders_cg.zip";
break; break;
case MENU_ENUM_LABEL_CB_CORE_THUMBNAILS_DOWNLOAD: case MENU_ENUM_LABEL_CB_CORE_THUMBNAILS_DOWNLOAD:
strlcpy(s, "http://thumbnailpacks.libretro.com", sizeof(s)); strcpy_literal(s, "http://thumbnailpacks.libretro.com");
break; break;
default: default:
strlcpy(s, network_buildbot_url, sizeof(s)); strlcpy(s, network_buildbot_url, sizeof(s));
@ -4898,8 +4898,8 @@ static int action_ok_add_to_favorites(const char *path,
if (string_is_empty(core_path) || string_is_empty(core_name)) if (string_is_empty(core_path) || string_is_empty(core_name))
{ {
strlcpy(core_path, "DETECT", sizeof(core_path)); strcpy_literal(core_path, "DETECT");
strlcpy(core_name, "DETECT", sizeof(core_name)); strcpy_literal(core_name, "DETECT");
} }
/* > crc32 + db_name */ /* > crc32 + db_name */
@ -6341,7 +6341,7 @@ static int action_ok_video_resolution(const char *path,
video_driver_set_video_mode(width, height, true); video_driver_set_video_mode(width, height, true);
#ifdef GEKKO #ifdef GEKKO
if (width == 0 || height == 0) if (width == 0 || height == 0)
strlcpy(msg, "Applying: DEFAULT", sizeof(msg)); strcpy_literal(msg, "Applying: DEFAULT");
else else
#endif #endif
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),

View File

@ -4204,10 +4204,13 @@ static int menu_displaylist_parse_input_description_kbd_list(menu_displaylist_in
/* TODO/FIXME: Localise 'Keyboard' */ /* TODO/FIXME: Localise 'Keyboard' */
if (key_id == RETROK_FIRST) if (key_id == RETROK_FIRST)
strlcpy(input_description, "---", sizeof(input_description)); strcpy_literal(input_description, "---");
else else
snprintf(input_description, sizeof(input_description), {
"Keyboard %s", key_label); strcpy_literal(input_description, "Keyboard ");
strlcat(input_description, key_label,
sizeof(input_description));
}
/* Add menu entry */ /* Add menu entry */
if (menu_entries_append_enum(info->list, if (menu_entries_append_enum(info->list,
@ -8866,7 +8869,7 @@ unsigned menu_displaylist_netplay_refresh_rooms(file_list_t *list)
if (*netplay_room_list[i].country) if (*netplay_room_list[i].country)
{ {
strlcpy(country, "(", sizeof(country)); strcpy_literal(country, "(");
strlcat(country, netplay_room_list[i].country, strlcat(country, netplay_room_list[i].country,
sizeof(country)); sizeof(country));
strlcat(country, ")", sizeof(country)); strlcat(country, ")", sizeof(country));
@ -9299,7 +9302,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
title[0] = '\0'; title[0] = '\0';
strlcpy(title, "Title: ", sizeof(title)); strcpy_literal(title, "Title: ");
strlcat(title, cd_info.title, sizeof(title)); strlcat(title, cd_info.title, sizeof(title));
if (menu_entries_append_enum(info->list, if (menu_entries_append_enum(info->list,
@ -9316,7 +9319,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
system[0] = '\0'; system[0] = '\0';
strlcpy(system, "System: ", sizeof(system)); strcpy_literal(system, "System: ");
strlcat(system, cd_info.system, sizeof(system)); strlcat(system, cd_info.system, sizeof(system));
if (menu_entries_append_enum(info->list, if (menu_entries_append_enum(info->list,
@ -9368,7 +9371,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
release_date[0] = '\0'; release_date[0] = '\0';
strlcpy(release_date, "Release Date: ", sizeof(release_date)); strcpy_literal(release_date, "Release Date: ");
strlcat(release_date, cd_info.release_date, sizeof(release_date)); strlcat(release_date, cd_info.release_date, sizeof(release_date));
if (menu_entries_append_enum(info->list, if (menu_entries_append_enum(info->list,
@ -9537,7 +9540,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
fgets(current_profile, PATH_MAX_LENGTH, profile); fgets(current_profile, PATH_MAX_LENGTH, profile);
pclose(profile); pclose(profile);
strlcpy(text, "Current profile : ", sizeof(text)); strcpy_literal(text, "Current profile : ");
strlcat(text, current_profile, sizeof(text)); strlcat(text, current_profile, sizeof(text));
#else #else
u32 currentClock = 0; u32 currentClock = 0;
@ -9599,7 +9602,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list); menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
strlcpy(text, "Current profile : ", sizeof(text)); strcpy_literal(text, "Current profile : ");
strlcat(text, current_profile, sizeof(text)); strlcat(text, current_profile, sizeof(text));
if (menu_entries_append_enum(info->list, text, "", 0, MENU_INFO_MESSAGE, 0, 0)) if (menu_entries_append_enum(info->list, text, "", 0, MENU_INFO_MESSAGE, 0, 0))
@ -11921,7 +11924,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
strlcat(ext_names, FILE_PATH_CORE_BACKUP_EXTENSION_NO_DOT, sizeof(ext_names)); strlcat(ext_names, FILE_PATH_CORE_BACKUP_EXTENSION_NO_DOT, sizeof(ext_names));
} }
else else
strlcpy(ext_names, FILE_PATH_CORE_BACKUP_EXTENSION_NO_DOT, sizeof(ext_names)); strcpy_literal(ext_names, FILE_PATH_CORE_BACKUP_EXTENSION_NO_DOT);
info->exts = strdup(ext_names); info->exts = strdup(ext_names);
} }

View File

@ -1142,7 +1142,7 @@ int setting_generic_action_start_default(rarch_setting_t *setting)
static void setting_get_string_representation_default(rarch_setting_t *setting, static void setting_get_string_representation_default(rarch_setting_t *setting,
char *s, size_t len) char *s, size_t len)
{ {
strlcpy(s, "...", len); strcpy_literal(s, "...");
} }
/** /**
@ -2767,10 +2767,10 @@ static void setting_get_string_representation_streaming_mode(
switch (*setting->value.target.unsigned_integer) switch (*setting->value.target.unsigned_integer)
{ {
case STREAMING_MODE_TWITCH: case STREAMING_MODE_TWITCH:
strlcpy(s, "Twitch", len); strcpy_literal(s, "Twitch");
break; break;
case STREAMING_MODE_YOUTUBE: case STREAMING_MODE_YOUTUBE:
strlcpy(s, "YouTube", len); strcpy_literal(s, "YouTube");
break; break;
case STREAMING_MODE_LOCAL: case STREAMING_MODE_LOCAL:
strlcpy(s, "Local", len); strlcpy(s, "Local", len);
@ -2892,12 +2892,12 @@ static void setting_get_string_representation_cheevos_password(
return; return;
if (!string_is_empty(setting->value.target.string)) if (!string_is_empty(setting->value.target.string))
strlcpy(s, "********", len); strcpy_literal(s, "********");
else else
{ {
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
if (settings->arrays.cheevos_token[0]) if (settings->arrays.cheevos_token[0])
strlcpy(s, "********", len); strcpy_literal(s, "********");
else else
*setting->value.target.string = '\0'; *setting->value.target.string = '\0';
} }
@ -2918,13 +2918,13 @@ static void setting_get_string_representation_uint_keyboard_gamepad_mapping_type
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NONE), len); strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NONE), len);
break; break;
case 1: case 1:
strlcpy(s, "iPega PG-9017", len); strcpy_literal(s, "iPega PG-9017");
break; break;
case 2: case 2:
strlcpy(s, "8-bitty", len); strcpy_literal(s, "8-bitty");
break; break;
case 3: case 3:
strlcpy(s, "SNES30 8bitdo", len); strcpy_literal(s, "SNES30 8bitdo");
break; break;
} }
} }
@ -3414,13 +3414,13 @@ static void setting_get_string_representation_uint_menu_timedate_date_separator(
switch (*setting->value.target.unsigned_integer) switch (*setting->value.target.unsigned_integer)
{ {
case MENU_TIMEDATE_DATE_SEPARATOR_HYPHEN: case MENU_TIMEDATE_DATE_SEPARATOR_HYPHEN:
strlcpy(s, "'-'", len); strcpy_literal(s, "'-'");
break; break;
case MENU_TIMEDATE_DATE_SEPARATOR_SLASH: case MENU_TIMEDATE_DATE_SEPARATOR_SLASH:
strlcpy(s, "'/'", len); strcpy_literal(s, "'/'");
break; break;
case MENU_TIMEDATE_DATE_SEPARATOR_PERIOD: case MENU_TIMEDATE_DATE_SEPARATOR_PERIOD:
strlcpy(s, "'.'", len); strcpy_literal(s, "'.'");
break; break;
} }
} }
@ -3963,13 +3963,13 @@ static void setting_get_string_representation_uint_menu_xmb_animation_horizontal
switch (*setting->value.target.unsigned_integer) switch (*setting->value.target.unsigned_integer)
{ {
case 0: case 0:
strlcpy(s, "Easing Out Quad", len); strcpy_literal(s, "Easing Out Quad");
break; break;
case 1: case 1:
strlcpy(s, "Easing In Sine", len); strcpy_literal(s, "Easing In Sine");
break; break;
case 2: case 2:
strlcpy(s, "Easing Out Bounce", len); strcpy_literal(s, "Easing Out Bounce");
break; break;
} }
} }
@ -4071,13 +4071,13 @@ static void setting_get_string_representation_uint_xmb_layout(
switch (*setting->value.target.unsigned_integer) switch (*setting->value.target.unsigned_integer)
{ {
case 0: case 0:
strlcpy(s, "Auto", len); strcpy_literal(s, "Auto");
break; break;
case 1: case 1:
strlcpy(s, "Console", len); strcpy_literal(s, "Console");
break; break;
case 2: case 2:
strlcpy(s, "Handheld", len); strcpy_literal(s, "Handheld");
break; break;
} }
} }

View File

@ -8220,7 +8220,7 @@ static bool menu_shader_manager_save_preset_internal(
} }
else else
{ {
strlcpy(fullname, "retroarch", sizeof(fullname)); strcpy_literal(fullname, "retroarch");
strlcat(fullname, strlcat(fullname,
video_shader_get_preset_extension(type), sizeof(fullname)); video_shader_get_preset_extension(type), sizeof(fullname));
} }
@ -8331,7 +8331,7 @@ static bool menu_shader_manager_operate_auto_preset(
switch (type) switch (type)
{ {
case SHADER_PRESET_GLOBAL: case SHADER_PRESET_GLOBAL:
strlcpy(file, "global", sizeof(file)); strcpy_literal(file, "global");
break; break;
case SHADER_PRESET_CORE: case SHADER_PRESET_CORE:
fill_pathname_join(file, core_name, core_name, sizeof(file)); fill_pathname_join(file, core_name, core_name, sizeof(file));