Use C99 for size_t loops.
This was done just by grepping for 'size_t i;' and 'size_t j;'. I left
everything in crypto/x509 and friends alone.
There's some instances in gcm.c that are non-trivial and pulled into a
separate CL for ease of review.
Change-Id: I6515804e3097f7e90855f1e7610868ee87117223
Reviewed-on: https://boringssl-review.googlesource.com/10801
Reviewed-by: Adam Langley <agl@google.com>
Commit-Queue: Adam Langley <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
diff --git a/ssl/ssl_ecdh.c b/ssl/ssl_ecdh.c
index 079ddb5..16599e4 100644
--- a/ssl/ssl_ecdh.c
+++ b/ssl/ssl_ecdh.c
@@ -504,8 +504,7 @@
};
static const SSL_ECDH_METHOD *method_from_group_id(uint16_t group_id) {
- size_t i;
- for (i = 0; i < OPENSSL_ARRAY_SIZE(kMethods); i++) {
+ for (size_t i = 0; i < OPENSSL_ARRAY_SIZE(kMethods); i++) {
if (kMethods[i].group_id == group_id) {
return &kMethods[i];
}
@@ -514,8 +513,7 @@
}
static const SSL_ECDH_METHOD *method_from_nid(int nid) {
- size_t i;
- for (i = 0; i < OPENSSL_ARRAY_SIZE(kMethods); i++) {
+ for (size_t i = 0; i < OPENSSL_ARRAY_SIZE(kMethods); i++) {
if (kMethods[i].nid == nid) {
return &kMethods[i];
}