diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2012-09-25 16:06:16 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2012-09-25 16:06:16 -0500 |
commit | 3988475b9b7fa251b00a29b076761d8c1c7e64dc (patch) | |
tree | 140c0410e1d8133ddd33e07ad2fc9c2a8d0e824b /qemu-timer.c | |
parent | 97fe81d3e8613be13754ff096c16b73010fd60ad (diff) | |
parent | 95df51a4a02a853af8828c281bce2d4f2a41d6fd (diff) |
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
* stefanha/trivial-patches:
w32: Always use standard instead of native format strings
net/socket: Fix compiler warning (regression for MinGW)
linux-user: Remove redundant null check and replace free by g_free
qemu-timer: simplify qemu_run_timers
TextConsole: saturate escape parameter in TTY_STATE_CSI
curses: don't initialize curses when qemu is daemonized
dtrace backend: add function to reserved words
pflash_cfi01: Fix warning caused by unreachable code
ioh3420: Remove unreachable code
lm4549: Fix buffer overflow
cadence_uart: Fix buffer overflow
qemu-sockets: Fix potential memory leak
qemu-ga: Remove unreachable code after g_error
target-i386: Allow tsc-frequency to be larger then 2.147G
Diffstat (limited to 'qemu-timer.c')
-rw-r--r-- | qemu-timer.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/qemu-timer.c b/qemu-timer.c index c7a1551a36..908a1030b6 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -372,21 +372,20 @@ bool qemu_timer_expired(QEMUTimer *timer_head, int64_t current_time) void qemu_run_timers(QEMUClock *clock) { - QEMUTimer **ptimer_head, *ts; + QEMUTimer *ts; int64_t current_time; if (!clock->enabled) return; current_time = qemu_get_clock_ns(clock); - ptimer_head = &clock->active_timers; for(;;) { - ts = *ptimer_head; + ts = clock->active_timers; if (!qemu_timer_expired_ns(ts, current_time)) { break; } /* remove timer from the list before calling the callback */ - *ptimer_head = ts->next; + clock->active_timers = ts->next; ts->next = NULL; /* run the callback (the timer list can be modified) */ |