Style guide: mention placement of & for reference types Change-Id: I87d474f81ecb33747e8b3a04ed3e71d1c07139ec Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/81247 Auto-Submit: Lily Chen <chlily@google.com> Reviewed-by: David Benjamin <davidben@google.com> Commit-Queue: Lily Chen <chlily@google.com> Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/STYLE.md b/STYLE.md index 1b6bd0b..29c0dd7 100644 --- a/STYLE.md +++ b/STYLE.md
@@ -33,14 +33,16 @@ Comments should be `// C99-style` for consistency with C++. -When declaring pointer types, `*` should be placed next to the variable name, -not the type. So +When declaring pointer or reference types, `*` or `&` should be placed next to +the variable name, not the type. So uint8_t *ptr; + const auto &blah; not uint8_t* ptr; + const auto& blah; Rather than `malloc()` and `free()`, use the wrappers `OPENSSL_malloc()` and `OPENSSL_free()`. Use the standard C `assert()` function freely.