diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-11 08:43:18 -0600 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-01-11 08:43:18 -0600 |
commit | fedf2de31023b4ee71a4e578db013976243a8143 (patch) | |
tree | 045c7ea2a636428ee70545ef3f76a804989be050 /vl.c | |
parent | e2848a78b0a6715f94623bdf43ef74d3d08cfe4d (diff) | |
parent | c02e1eac887b1b0aee7361b1fcf889e7d47fed9d (diff) | |
download | qemu-fedf2de31023b4ee71a4e578db013976243a8143.zip qemu-fedf2de31023b4ee71a4e578db013976243a8143.tar.gz qemu-fedf2de31023b4ee71a4e578db013976243a8143.tar.bz2 |
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
* stefanha/trivial-patches:
hw/pc.c: Fix converting of ioport_register* to MemoryRegion
Replace remaining gmtime, localtime by gmtime_r, localtime_r
savevm: Remove MinGW specific code which is no longer needed
qga/channel-posix.c: Explicitly include string.h
configure: Fix comment (copy+paste bug)
readline: avoid memcpy() of overlapping regions
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -448,21 +448,18 @@ StatusInfo *qmp_query_status(Error **errp) void qemu_get_timedate(struct tm *tm, int offset) { time_t ti; - struct tm *ret; time(&ti); ti += offset; if (rtc_date_offset == -1) { if (rtc_utc) - ret = gmtime(&ti); + gmtime_r(&ti, tm); else - ret = localtime(&ti); + localtime_r(&ti, tm); } else { ti -= rtc_date_offset; - ret = gmtime(&ti); + gmtime_r(&ti, tm); } - - memcpy(tm, ret, sizeof(struct tm)); } int qemu_timedate_diff(struct tm *tm) |