Scope reduce some variables.

This commit is contained in:
Michael Drake 2014-05-30 22:27:07 +01:00
parent 3ce61d6950
commit 4fbe86bc5a

View File

@ -129,13 +129,14 @@ nserror riscos_schedule(int t, void (*callback)(void *p), void *p)
bool schedule_run(void) bool schedule_run(void)
{ {
struct sched_entry *entry; struct sched_entry *entry;
void (*callback)(void *p);
void *p;
os_t now; os_t now;
now = os_read_monotonic_time(); now = os_read_monotonic_time();
while (sched_queue.next && sched_queue.next->time <= now) { while (sched_queue.next && sched_queue.next->time <= now) {
void (*callback)(void *p);
void *p;
entry = sched_queue.next; entry = sched_queue.next;
callback = entry->callback; callback = entry->callback;
p = entry->p; p = entry->p;