From: Eric S. Raymond Date: Tue, 28 Feb 2023 11:45:24 +0000 (-0500) Subject: Eliminate a bad code smell. X-Git-Tag: 1.13~8 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=20859304c0e13f4d7a61835fb6912735d98cd3b2;p=open-adventure.git Eliminate a bad code smell. --- diff --git a/score.c b/score.c index 275a358..4331f7f 100644 --- a/score.c +++ b/score.c @@ -126,8 +126,8 @@ void terminate(enum termination mode) for (int i = 1; i <= (int)NCLASSES; i++) { if (classes[i].threshold >= points) { speak(classes[i].message); - i = classes[i].threshold + 1 - points; - rspeak(NEXT_HIGHER, i, i); + int nxt = classes[i].threshold + 1 - points; + rspeak(NEXT_HIGHER, nxt, nxt); exit(EXIT_SUCCESS); } }