Don't use a for-loop decleration

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3149)
diff --git a/crypto/ct/ct_x509v3.c b/crypto/ct/ct_x509v3.c
index c16005d..7e370f4 100644
--- a/crypto/ct/ct_x509v3.c
+++ b/crypto/ct/ct_x509v3.c
@@ -32,7 +32,8 @@
 
 static int set_sct_list_source(STACK_OF(SCT) *s, sct_source_t source) {
     if (s != NULL) {
-        for (size_t i = 0; i < sk_SCT_num(s); i++) {
+        size_t i;
+        for (i = 0; i < sk_SCT_num(s); i++) {
             int res = SCT_set_source(
                 sk_SCT_value(s, i), SCT_SOURCE_X509V3_EXTENSION);
             if (res != 1) {