From: Richard Levitte Date: Wed, 5 Jun 2002 13:47:06 +0000 (+0000) Subject: It's not good to have a pointer point at something in an inner block. X-Git-Tag: OpenSSL_0_9_6e~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=12c853701e80f7613e1e9df182bc0a5d44123f1b;p=openssl It's not good to have a pointer point at something in an inner block. PR: 66 --- 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