[ovs-dev] [PATCH 02/10] timeval: Workaround strftime bug in VS 2013.
blp at nicira.com
Wed May 14 18:13:31 UTC 2014
On Tue, May 13, 2014 at 09:03:16AM -0700, Gurucharan Shetty wrote:
> Visual Studio 2013's behavior is to crash when 0 is passed as second
> argument to strftime.
> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
Would you mind changing the name of xstrftime()? The 'x' prefix in our
code normally means that the function aborts if it fails to allocate
memory (e.g. xmalloc(), xrealloc(), ...), but this function is
I guess we only have only call to strftime() of this type. The fix
could even be inline, e.g.:
/* Visual Studio 2013's behavior is to crash when 0 is passed as second
* argument to strftime. */
n = max ? strftime(s, max, format, &tm->tm) : 0;
More information about the dev