]> granicus.if.org Git - nethack/commitdiff
remove duplicate code
authorSHIRAKATA Kentaro <argrath@ub32.org>
Sun, 31 Oct 2021 10:04:45 +0000 (19:04 +0900)
committerPatR <rankin@nethack.org>
Thu, 22 Sep 2022 00:00:01 +0000 (17:00 -0700)
Here, `then` clause and `else` clause is identical.

src/role.c

index 6cc00c578c98d0106447a6d3f62317eb7582c85b..d8bc060b071773c4708ed9d3e23e7309c3d15998 100644 (file)
@@ -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)