From 8e7bd4d2aa1fed264b96189047005f0982e2ffae Mon Sep 17 00:00:00 2001 From: Ivan Tham Date: Mon, 11 Jul 2016 20:35:56 +0800 Subject: [PATCH] Simplify infinal loop --- spt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spt.c b/spt.c index cb7bf14..dbe7be6 100644 --- a/spt.c +++ b/spt.c @@ -123,7 +123,7 @@ run: for (timecount = 0; timecount < timers[i].tmr; timecount++) sleep(1); - i + 1 >= LEN(timers) ? i = 0 : i++; /* i infinal loop */ + i < LEN(timers) ? i++ : i = 0; /* i infinal loop */ goto run; return 0;