From: tb Date: Tue, 28 Dec 2021 17:45:41 +0000 (+0000) Subject: Another small readability tweak in X509v3_addr_inherits() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=51620ae2cf6f356e0b907596cad2f3026fbb647f;p=openbsd Another small readability tweak in X509v3_addr_inherits() Declare IPAddressFamily before using it. --- diff --git a/lib/libcrypto/x509/x509_addr.c b/lib/libcrypto/x509/x509_addr.c index e448c4ae695..0f1a9a118fb 100644 --- a/lib/libcrypto/x509/x509_addr.c +++ b/lib/libcrypto/x509/x509_addr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_addr.c,v 1.37 2021/12/28 17:25:46 tb Exp $ */ +/* $OpenBSD: x509_addr.c,v 1.38 2021/12/28 17:45:41 tb Exp $ */ /* * Contributed to the OpenSSL Project by the American Registry for * Internet Numbers ("ARIN"). @@ -1492,13 +1492,14 @@ const X509V3_EXT_METHOD v3_addr = { int X509v3_addr_inherits(IPAddrBlocks *addr) { + IPAddressFamily *f; int i; if (addr == NULL) return 0; for (i = 0; i < sk_IPAddressFamily_num(addr); i++) { - IPAddressFamily *f = sk_IPAddressFamily_value(addr, i); + f = sk_IPAddressFamily_value(addr, i); if (IPAddressFamily_inheritance(f) != NULL) return 1;