From: SHIRAKATA Kentaro Date: Sun, 31 Oct 2021 10:04:45 +0000 (+0900) Subject: remove duplicate code X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2a8ddf1145c0e3028e275433213027cc315e25b8;p=nethack remove duplicate code Here, `then` clause and `else` clause is identical. --- diff --git a/src/role.c b/src/role.c index 6cc00c578..d8bc060b0 100644 --- a/src/role.c +++ b/src/role.c @@ -1388,17 +1388,10 @@ root_plselection_prompt( if (alignnum != ROLE_NONE && alignnum != ROLE_RANDOM && ok_align(rolenum, racenum, gendnum, alignnum)) { /* if race specified, and multiple choice of alignments for it */ - if ((racenum >= 0) && (aligncount > 1)) { - if (donefirst) - Strcat(buf, " "); - Strcat(buf, aligns[alignnum].adj); - donefirst = TRUE; - } else { - if (donefirst) - Strcat(buf, " "); - Strcat(buf, aligns[alignnum].adj); - donefirst = TRUE; - } + if (donefirst) + Strcat(buf, " "); + Strcat(buf, aligns[alignnum].adj); + donefirst = TRUE; } else { /* in case we got here by failing the ok_align() test */ if (alignnum != ROLE_RANDOM)