From: Holger Schemel Date: Sat, 11 May 2024 12:05:47 +0000 (+0200) Subject: minor code cleanup X-Git-Tag: 4.4.0.0-test-2~24 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=fa487f142c8cb4249acb925747f9fff484f39a10;p=rocksndiamonds.git minor code cleanup --- diff --git a/src/files.c b/src/files.c index ad068631..7b2d7b2d 100644 --- a/src/files.c +++ b/src/files.c @@ -4645,11 +4645,9 @@ static void CopyNativeLevel_BD_to_RND(struct LevelInfo *level) // level name char *cave_name_latin1 = getLatin1FromUTF8(cave->name); - char *cave_name_final; - if (gd_caveset_has_levels()) - cave_name_final = getStringPrint("%s / %d", cave_name_latin1, bd_level_nr + 1); - else - cave_name_final = getStringCopy(cave_name_latin1); + char *cave_name_final = (gd_caveset_has_levels() ? + getStringPrint("%s / %d", cave_name_latin1, bd_level_nr + 1) : + getStringCopy(cave_name_latin1)); strncpy(level->name, cave_name_final, MAX_LEVEL_NAME_LEN); level->name[MAX_LEVEL_NAME_LEN] = '\0';