Commit 12c85370 authored by Richard Levitte's avatar Richard Levitte
Browse files

It's not good to have a pointer point at something in an inner block.

PR: 66
parent d5353b5f
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -270,6 +270,9 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
	{
	struct tm *tm;
#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) && !defined(_DARWIN)
	struct tm data;
#endif
	int offset;
	int year;

@@ -287,7 +290,8 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
	t -= offset*60; /* FIXME: may overflow in extreme cases */

#if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__) && !defined(_DARWIN)
	{ struct tm data; gmtime_r(&t, &data); tm = &data; }
	gmtime_r(&t, &data);
	tm = &data;
#else
	tm = gmtime(&t);
#endif