Adding ARRAY_SIZE macro for getting the size of constant arrays. Change-Id: Ie60744761f5aa434a71a998f5ca98a8f8b1c25d5 Reviewed-on: https://boringssl-review.googlesource.com/10447 Reviewed-by: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/ssl/ssl_lib.c b/ssl/ssl_lib.c index 9be76be..52701f4 100644 --- a/ssl/ssl_lib.c +++ b/ssl/ssl_lib.c
@@ -2667,7 +2667,7 @@ {TLS1_3_VERSION, SSL_OP_NO_TLSv1_3}, }; -static const size_t kVersionsLen = sizeof(kVersions) / sizeof(kVersions[0]); +static const size_t kVersionsLen = OPENSSL_ARRAY_SIZE(kVersions); int ssl_get_full_version_range(const SSL *ssl, uint16_t *out_min_version, uint16_t *out_fallback_version,