It's not good to have a pointer point at something in an inner block.
authorRichard Levitte <levitte@openssl.org>
Wed, 5 Jun 2002 13:47:06 +0000 (13:47 +0000)
committerRichard Levitte <levitte@openssl.org>
Wed, 5 Jun 2002 13:47:06 +0000 (13:47 +0000)
PR: 66

crypto/asn1/a_utctm.c

index 3ae7432cb20aef77a7c4ecebb37ea2dcdd2215ba..dd5955ac9fdd778095bb23252cc6ed332c367831 100644 (file)
@@ -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