Commit a847149bf4 for openssl.org
commit a847149bf4dcb5b30a5b112be49d5048ae288c6a
Author: Matt Caswell <matt@openssl.foundation>
Date: Thu Aug 20 11:29:13 2026 +0100
Reformat a foreach member call for the new ForEachMacros list
ossl_dgram_conn_lookup_foreach() calls a struct member named foreach.
clang-format has a built-in ForEachMacros list which contains foreach,
and it formats anything on that list like a control statement, with a
space before the parenthesis. The space was therefore correct when this
code was written, and check-style accepted it.
Master has since set ForEachMacros explicitly, to name the OSSL_RBT_*
macros. Setting the option replaces the built-in list rather than adding
to it, so foreach is no longer on it and is now formatted as an ordinary
function call, with no space. That turned an already compliant line into
a check-style failure without the line itself changing.
git rebase does not run the pre-commit hooks over the commits it
replays, so nothing reformatted this on the way past.
Assisted-by: Claude Code:claude-opus-5
Reviewed-by: Ryan Hooper <ryanh@openssl.foundation>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Merge-date: Fri Aug 21 18:10:42 2026
Merged-from: https://github.com/openssl/openssl/pull/32441
diff --git a/ssl/dtls_conn_lookup.c b/ssl/dtls_conn_lookup.c
index 7460e8a5d2..27f4c66076 100644
--- a/ssl/dtls_conn_lookup.c
+++ b/ssl/dtls_conn_lookup.c
@@ -508,7 +508,7 @@ void ossl_dgram_conn_lookup_foreach(DGRAM_CONN_LOOKUP *lookup,
if (lookup == NULL || lookup->methods == NULL
|| lookup->methods->foreach == NULL)
return;
- lookup->methods->foreach (lookup, cb, arg);
+ lookup->methods->foreach(lookup, cb, arg);
}
void ossl_dgram_conn_lookup_free(DGRAM_CONN_LOOKUP *lookup)