mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
Replace remaining gmtime, localtime by gmtime_r, localtime_r
This allows removing of MinGW specific code and improves reentrancy for POSIX hosts. [Removed unused ret variable in qemu_get_timedate() to fix warning: vl.c: In function ‘qemu_get_timedate’: vl.c:451:16: error: variable ‘ret’ set but not used [-Werror=unused-but-set-variable] -- Stefan Hajnoczi] Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
68b891ec39
commit
eb7ff6fb0b
4 changed files with 4 additions and 21 deletions
|
@ -2830,7 +2830,7 @@ static void omap_rtc_tick(void *opaque)
|
|||
s->round = 0;
|
||||
}
|
||||
|
||||
memcpy(&s->current_tm, localtime(&s->ti), sizeof(s->current_tm));
|
||||
localtime_r(&s->ti, &s->current_tm);
|
||||
|
||||
if ((s->interrupts & 0x08) && s->ti == s->alarm_ti) {
|
||||
s->status |= 0x40;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue