external/boringssl: Sync to 3ef7697ed30f28367395a5aafb57a12a19906d96.
This includes the following changes:
https://boringssl.googlesource.com/boringssl/+log/3cbdc34619daafb9f8527fb9dd27afc8ee7dcf19..3ef7697ed30f28367395a5aafb57a12a19906d96
This also updates the UPDATING script to create the git commit
automatically.
Test: make checkbuild
Test: cts-tradefed run cts -m CtsLibcoreOkHttpTestCases -a arm64-v8a
Test: cts-tradefed run cts -m CtsLibcoreTestCases -a arm64-v8a
Change-Id: I9e785971e5be19daf29697f010c3ae4e1ca70b04
diff --git a/src/crypto/cipher/tls_cbc.c b/src/crypto/cipher/tls_cbc.c
index 02d6745..dd6ab8c 100644
--- a/src/crypto/cipher/tls_cbc.c
+++ b/src/crypto/cipher/tls_cbc.c
@@ -264,23 +264,27 @@
/* u32toBE serialises an unsigned, 32-bit number (n) as four bytes at (p) in
* big-endian order. The value of p is advanced by four. */
-#define u32toBE(n, p) \
- (*((p)++)=(uint8_t)(n>>24), \
- *((p)++)=(uint8_t)(n>>16), \
- *((p)++)=(uint8_t)(n>>8), \
- *((p)++)=(uint8_t)(n))
+#define u32toBE(n, p) \
+ do { \
+ *((p)++) = (uint8_t)((n) >> 24); \
+ *((p)++) = (uint8_t)((n) >> 16); \
+ *((p)++) = (uint8_t)((n) >> 8); \
+ *((p)++) = (uint8_t)((n)); \
+ } while (0)
/* u64toBE serialises an unsigned, 64-bit number (n) as eight bytes at (p) in
* big-endian order. The value of p is advanced by eight. */
-#define u64toBE(n, p) \
- (*((p)++)=(uint8_t)(n>>56), \
- *((p)++)=(uint8_t)(n>>48), \
- *((p)++)=(uint8_t)(n>>40), \
- *((p)++)=(uint8_t)(n>>32), \
- *((p)++)=(uint8_t)(n>>24), \
- *((p)++)=(uint8_t)(n>>16), \
- *((p)++)=(uint8_t)(n>>8), \
- *((p)++)=(uint8_t)(n))
+#define u64toBE(n, p) \
+ do { \
+ *((p)++) = (uint8_t)((n) >> 56); \
+ *((p)++) = (uint8_t)((n) >> 48); \
+ *((p)++) = (uint8_t)((n) >> 40); \
+ *((p)++) = (uint8_t)((n) >> 32); \
+ *((p)++) = (uint8_t)((n) >> 24); \
+ *((p)++) = (uint8_t)((n) >> 16); \
+ *((p)++) = (uint8_t)((n) >> 8); \
+ *((p)++) = (uint8_t)((n)); \
+ } while (0)
/* These functions serialize the state of a hash and thus perform the standard
* "final" operation without adding the padding and length that such a function