Eliminate a bad code smell.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 28 Feb 2023 11:45:24 +0000 (06:45 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 28 Feb 2023 11:45:24 +0000 (06:45 -0500)
score.c

diff --git a/score.c b/score.c
index 275a35815f075a60a5cab46b6f9d96bba76a5e3b..4331f7f93bfecd6485eaa71e2c8fef1730a71c8e 100644 (file)
--- 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);
         }
     }