From 12c853701e80f7613e1e9df182bc0a5d44123f1b Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Wed, 5 Jun 2002 13:47:06 +0000 Subject: [PATCH] It's not good to have a pointer point at something in an inner block. PR: 66 --- crypto/asn1/a_utctm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crypto/asn1/a_utctm.c b/crypto/asn1/a_utctm.c index 3ae7432cb2..dd5955ac9f 100644 --- a/crypto/asn1/a_utctm.c +++ b/crypto/asn1/a_utctm.c @@ -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 -- 2.25.1