|
From: | Rik van Riel |
Subject: | Re: [Qemu-devel] [PATCH] qemu_timedate_diff() shouldn't modify its argument. |
Date: | Mon, 07 Nov 2011 14:09:50 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:7.0) Gecko/20110927 Thunderbird/7.0 |
On 11/06/2011 11:00 AM, Gleb Natapov wrote:
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.
Ohhh, nice catch.
Signed-off-by: Gleb Natapov<address@hidden>
Acked-by: Rik van Riel <address@hidden> -- All rights reversed
[Prev in Thread] | Current Thread | [Next in Thread] |