From 9da05f738c24de0dd683245b69b17cc9dd86fd8a Mon Sep 17 00:00:00 2001 From: Cas Cremers Date: Fri, 19 Oct 2018 15:55:39 -0400 Subject: [PATCH] Another trampoline gone. --- src/system.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/system.c b/src/system.c index 7ea47ee..4072e42 100644 --- a/src/system.c +++ b/src/system.c @@ -1039,16 +1039,19 @@ iterateRuns (const System sys, int (*callback) (int r)) int iterateRegularRuns (const System sys, int (*callback) (int r)) { - int regular (int r) - { - if (sys->runs[r].protocol != INTRUDER) - { - return callback (r); - } - return true; - } + int r; - return iterateRuns (sys, regular); + for (r = 0; r < sys->maxruns; r++) + { + if (sys->runs[r].protocol != INTRUDER) + { + if (!callback (r)) + { + return false; + } + } + } + return true; } // Iterate over events in a certain run (increasing through role)