boringssl/crypto
David Benjamin b1133e9565 Fix up macros.
Macros need a healthy dose of parentheses to avoid expression-level
misparses. Most of this comes from the clang-tidy CL here:
https://android-review.googlesource.com/c/235696/

Also switch most of the macros to use do { ... } while (0) to avoid all
the excessive comma operators and statement-level misparses.

Change-Id: I4c2ee51e347d2aa8c74a2d82de63838b03bbb0f9
Reviewed-on: https://boringssl-review.googlesource.com/11660
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2016-10-18 18:28:23 +00:00
..
aes Replace keywrap AEADs with upstream's APIs. 2016-10-04 01:37:31 +00:00
asn1 Fix up macros. 2016-10-18 18:28:23 +00:00
base64 Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
bio Place comment(lib, *) pragmas under OPENSSL_MSVC_PRAGMA. 2016-10-10 19:25:55 +00:00
bn Fix up macros. 2016-10-18 18:28:23 +00:00
buf Add BUF_MEM_reserve. 2016-05-18 19:09:06 +00:00
bytestring Add CBS_get_any_asn1. 2016-10-03 18:36:14 +00:00
chacha Use fewer macros in C ChaCha implementation. 2016-09-13 01:56:09 +00:00
cipher Fix up macros. 2016-10-18 18:28:23 +00:00
cmac Replace Scoped* heap types with bssl::UniquePtr. 2016-09-01 22:22:54 +00:00
conf Add missing internal includes. 2016-03-20 16:38:54 +00:00
curve25519 Replace Scoped* heap types with bssl::UniquePtr. 2016-09-01 22:22:54 +00:00
des Fix up macros. 2016-10-18 18:28:23 +00:00
dh Fold stack-allocated types into headers. 2016-09-07 21:50:05 +00:00
digest Fix up macros. 2016-10-18 18:28:23 +00:00
dsa Add various 1.1.0 accessors. 2016-08-10 16:52:15 +00:00
ec Fix up macros. 2016-10-18 18:28:23 +00:00
ecdh Const-correct ECDH_compute_key. 2016-10-09 17:53:19 +00:00
ecdsa Replace Scoped* heap types with bssl::UniquePtr. 2016-09-01 22:22:54 +00:00
engine Remove trailing ';' from macros 2016-09-12 19:17:26 +00:00
err Add the certificate_required alert. 2016-10-10 15:48:06 +00:00
evp Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
hkdf Adding ARRAY_SIZE macro for getting the size of constant arrays. 2016-08-19 19:30:39 +00:00
hmac Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
lhash Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
md4 Fix up macros. 2016-10-18 18:28:23 +00:00
md5 Fix up macros. 2016-10-18 18:28:23 +00:00
modes Fix up macros. 2016-10-18 18:28:23 +00:00
newhope Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
obj Rename the |dont_return_name| flag of |OBJ_obj2txt| to |always_return_oid|. 2016-08-10 17:18:25 +00:00
pem Reject inappropriate private key encryption ciphers. 2016-05-03 16:30:08 +00:00
perlasm Add PPC64LE assembly for AES-GCM. 2016-09-27 18:43:20 +00:00
pkcs8 Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
poly1305 Resolve a small handful of size_t truncation warnings. 2016-08-05 19:12:31 +00:00
rand Resolve a small handful of size_t truncation warnings. 2016-08-05 19:12:31 +00:00
rc4 Simplify RC4 code and remove assembly. 2016-08-30 15:32:31 +00:00
rsa Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
sha Fix up macros. 2016-10-18 18:28:23 +00:00
stack Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
test C++ crypto/test/malloc.cc more. 2016-10-14 16:01:26 +00:00
x509 Fix up macros. 2016-10-18 18:28:23 +00:00
x509v3 Fix up macros. 2016-10-18 18:28:23 +00:00
CMakeLists.txt Add PPC64LE assembly for AES-GCM. 2016-09-27 18:43:20 +00:00
constant_time_test.c Update constant-time operations. 2014-11-10 13:48:30 -08:00
cpu-aarch64-linux.c Rewrite ARM feature detection. 2016-03-26 04:54:44 +00:00
cpu-arm-linux.c Make CRYPTO_is_NEON_capable aware of the buggy CPU. 2016-04-28 16:42:21 +00:00
cpu-arm.c Rewrite ARM feature detection. 2016-03-26 04:54:44 +00:00
cpu-intel.c Wrap MSVC-only warning pragmas in a macro. 2016-06-09 21:29:36 +00:00
cpu-ppc64le.c Add PPC64LE assembly for AES-GCM. 2016-09-27 18:43:20 +00:00
crypto.c Add PPC64LE assembly for AES-GCM. 2016-09-27 18:43:20 +00:00
ex_data.c Use C99 for size_t loops. 2016-09-12 19:44:24 +00:00
internal.h Add PPC64LE assembly for AES-GCM. 2016-09-27 18:43:20 +00:00
mem.c Breaking news: 1998 has come and gone. 2016-07-11 23:51:47 +00:00
refcount_c11.c Cast refcounts to _Atomic before use. 2015-05-20 13:39:22 -07:00
refcount_lock.c Split unlock functions into read/write variants. 2016-05-31 21:09:29 +00:00
refcount_test.c Specify argc and argv arguments to refcount_test:main. 2015-05-20 13:49:41 -07:00
thread_none.c Split unlock functions into read/write variants. 2016-05-31 21:09:29 +00:00
thread_pthread.c Use pthreads on MinGW. 2016-09-20 22:25:14 +00:00
thread_test.c Wrap MSVC-only warning pragmas in a macro. 2016-06-09 21:29:36 +00:00
thread_win.c Use pthreads on MinGW. 2016-09-20 22:25:14 +00:00
thread.c Remove a bunch of unnecessary includes. 2016-06-28 20:31:14 +00:00
time_support.c Remove some mingw support cruft. 2016-01-25 23:05:45 +00:00