]> git.proxmox.com Git - mirror_qemu.git/commit - vl.c
qemu_timedate_diff() shouldn't modify its argument.
authorGleb Natapov <gleb@redhat.com>
Sun, 6 Nov 2011 16:00:22 +0000 (18:00 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Mon, 7 Nov 2011 16:57:37 +0000 (10:57 -0600)
commitf54c556c08c57a317ad54f5d2d9ad549b931cda2
tree293870306848da862733cd30edbf52995d5ee12f
parent47113ab6b8c5659ad94c69aacca572f731ebb0ac
qemu_timedate_diff() shouldn't modify its argument.

The caller of qemu_timedate_diff() does not expect that tm it passes to
the function will be modified, but mktime() is destructive and modifies
its argument. Pass a copy of tm to it and set tm_isdst so that mktime()
will not rely on it since its value may be outdated.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
vl.c