From 4fbe86bc5a87d98adb49da85685d5c097bd91452 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 30 May 2014 22:27:07 +0100 Subject: [PATCH] Scope reduce some variables. --- riscos/schedule.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/riscos/schedule.c b/riscos/schedule.c index 6788811e2..286bdefa9 100644 --- a/riscos/schedule.c +++ b/riscos/schedule.c @@ -129,13 +129,14 @@ nserror riscos_schedule(int t, void (*callback)(void *p), void *p) bool schedule_run(void) { struct sched_entry *entry; - void (*callback)(void *p); - void *p; os_t now; now = os_read_monotonic_time(); while (sched_queue.next && sched_queue.next->time <= now) { + void (*callback)(void *p); + void *p; + entry = sched_queue.next; callback = entry->callback; p = entry->p;