Skip to content

Commit ba33252

Browse files
committed
Removing main_msg intermediary variable and tidy-up
1 parent 2c192be commit ba33252

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

cheevos/cheevos.c

+7-6
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,8 @@ int rcheevos_get_richpresence(char *s, size_t len)
684684
int _len = snprintf(s, len, msg_hash_to_str(MSG_CHEEVOS_RICH_PRESENCE_PLAYING),
685685
rcheevos_locals.game.title);
686686

687-
if (_len < 0) { return -1; }
687+
if (_len < 0)
688+
return -1;
688689
}
689690
return ret;
690691
}
@@ -1755,7 +1756,6 @@ static void rcheevos_show_game_placard(void)
17551756
else
17561757
{
17571758
char number_of_unsupported_msg[64];
1758-
char main_msg[256];
17591759
int _len;
17601760

17611761
snprintf(number_of_unsupported_msg,
@@ -1764,19 +1764,20 @@ static void rcheevos_show_game_placard(void)
17641764
number_of_unsupported);
17651765

17661766
if (settings->bools.cheevos_start_active)
1767-
snprintf(main_msg, sizeof(main_msg),
1767+
snprintf(msg, sizeof(msg),
17681768
msg_hash_to_str(MSG_CHEEVOS_ALL_ACHIEVEMENTS_ACTIVATED),
17691769
number_of_core);
17701770
else
1771-
snprintf(main_msg, sizeof(main_msg),
1771+
snprintf(msg, sizeof(msg),
17721772
msg_hash_to_str(MSG_CHEEVOS_NUMBER_ACHIEVEMENTS_UNLOCKED),
17731773
number_of_core - number_of_active - number_of_unsupported,
17741774
number_of_core);
17751775

17761776
_len = snprintf(msg, sizeof(msg),
1777-
"%s (%s)", main_msg, number_of_unsupported_msg);
1777+
"%s (%s)", msg, number_of_unsupported_msg);
17781778

1779-
if (_len < 0) { return; }
1779+
if (_len < 0)
1780+
return;
17801781
}
17811782

17821783
msg[sizeof(msg) - 1] = 0;

0 commit comments

Comments
 (0)