Wireshark-dev: Re: [Wireshark-dev] localtime_r() in gtk/timeshift_dlg.c

From: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
Date: Tue, 16 Aug 2011 19:52:14 +0200
On Tue, Aug 16, 2011 at 12:17 AM, Gisle Vanem <gisle.vanem@xxxxxxxxx> wrote:
> This:
>  #ifdef _MSC_VER
>  #define localtime_r(a, b) memcpy((b), localtime((a)), sizeof(struct tm));
>  #endif
>
> doesn't look so safe. We should maybe use the localtime_r() in
> wsutil/strptime.c?

Or simply just use localtime, check the return value and then copy the values.
Like in revision 38569.


-- 
Stig Bjørlykke