From: tb Date: Wed, 5 Jan 2022 17:55:33 +0000 (+0000) Subject: Rename {c,p}_{min,max} into {child,parent}_{min,max} X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=d0764d1b693f2c31b875f49d9fc62f10e1d3c8b9;p=openbsd Rename {c,p}_{min,max} into {child,parent}_{min,max} --- diff --git a/lib/libcrypto/x509/x509_addr.c b/lib/libcrypto/x509/x509_addr.c index 2a102e13ac6..a9e10bff3ba 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.73 2022/01/05 17:53:42 tb Exp $ */ +/* $OpenBSD: x509_addr.c,v 1.74 2022/01/05 17:55:33 tb Exp $ */ /* * Contributed to the OpenSSL Project by the American Registry for * Internet Numbers ("ARIN"). @@ -1657,8 +1657,8 @@ static int addr_contains(IPAddressOrRanges *parent, IPAddressOrRanges *child, int length) { IPAddressOrRange *child_aor, *parent_aor; - unsigned char p_min[ADDR_RAW_BUF_LEN], p_max[ADDR_RAW_BUF_LEN]; - unsigned char c_min[ADDR_RAW_BUF_LEN], c_max[ADDR_RAW_BUF_LEN]; + uint8_t parent_min[ADDR_RAW_BUF_LEN], parent_max[ADDR_RAW_BUF_LEN]; + uint8_t child_min[ADDR_RAW_BUF_LEN], child_max[ADDR_RAW_BUF_LEN]; int p, c; if (child == NULL || parent == child) @@ -1670,7 +1670,7 @@ addr_contains(IPAddressOrRanges *parent, IPAddressOrRanges *child, int length) for (c = 0; c < sk_IPAddressOrRange_num(child); c++) { child_aor = sk_IPAddressOrRange_value(child, c); - if (!extract_min_max(child_aor, c_min, c_max, length)) + if (!extract_min_max(child_aor, child_min, child_max, length)) return 0; for (;; p++) { @@ -1679,12 +1679,13 @@ addr_contains(IPAddressOrRanges *parent, IPAddressOrRanges *child, int length) parent_aor = sk_IPAddressOrRange_value(parent, p); - if (!extract_min_max(parent_aor, p_min, p_max, length)) + if (!extract_min_max(parent_aor, parent_min, parent_max, + length)) return 0; - if (memcmp(p_max, c_max, length) < 0) + if (memcmp(parent_max, child_max, length) < 0) continue; - if (memcmp(p_min, c_min, length) > 0) + if (memcmp(parent_min, child_min, length) > 0) return 0; break; }