Cleanup menu_displaylist_parse_content_information

This commit is contained in:
twinaphex 2019-09-18 10:19:44 +02:00
parent d09362ed6f
commit 3a61cfe6ec

View File

@ -3011,8 +3011,12 @@ static unsigned menu_displaylist_parse_content_information(
{
tmp[0] = '\0';
n = snprintf(tmp, sizeof(tmp),
"%s: %s", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_INFO_LABEL), content_label);
n = strlcpy(tmp, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_INFO_LABEL), sizeof(tmp));
tmp[n ] = ':';
tmp[n+1] = ' ';
tmp[n+2] = '\0';
n = strlcat(tmp, content_label, sizeof(tmp));
tmp[n ] = '\0';
/* Silence gcc compiler warning
* (getting so sick of these...) */
@ -3031,8 +3035,12 @@ static unsigned menu_displaylist_parse_content_information(
{
tmp[0] = '\0';
n = snprintf(tmp, sizeof(tmp),
"%s: %s", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_INFO_PATH), content_path);
n = strlcpy(tmp, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_INFO_PATH), sizeof(tmp));
tmp[n ] = ':';
tmp[n+1] = ' ';
tmp[n+2] = '\0';
n = strlcat(tmp, content_path, sizeof(tmp));
tmp[n ] = '\0';
/* Silence gcc compiler warning
* (getting so sick of these...) */
@ -3052,8 +3060,12 @@ static unsigned menu_displaylist_parse_content_information(
{
tmp[0] = '\0';
n = snprintf(tmp, sizeof(tmp),
"%s: %s", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_INFO_CORE_NAME), core_name);
n = strlcpy(tmp, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_INFO_CORE_NAME), sizeof(tmp));
tmp[n ] = ':';
tmp[n+1] = ' ';
tmp[n+2] = '\0';
n = strlcat(tmp, core_name, sizeof(tmp));
tmp[n ] = '\0';
/* Silence gcc compiler warning
* (getting so sick of these...) */
@ -3085,8 +3097,12 @@ static unsigned menu_displaylist_parse_content_information(
{
tmp[0] = '\0';
n = snprintf(tmp, sizeof(tmp),
"%s: %s", msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_INFO_DATABASE), db_name_no_ext);
n = strlcpy(tmp, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_INFO_DATABASE), sizeof(tmp));
tmp[n ] = ':';
tmp[n+1] = ' ';
tmp[n+2] = '\0';
n = strlcat(tmp, db_name_no_ext, sizeof(tmp));
tmp[n ] = '\0';
/* Silence gcc compiler warning
* (getting so sick of these...) */