Re-run clang-format with InsertBraces.
This CL runs the same command as in the preceding CL, but with
'IncludeBraces: true' added to .clang-format. I've split this out
separately because the documentation says:
> Setting this option to true could lead to incorrect code formatting
> due to clang-format’s lack of complete semantic information. As such,
> extra care should be taken to review code changes made by this option.
I've also kept InsertBraces out of .clang-format for now because it's a
fairly recent option, and clang-format fails when it sees unrecognized
options.
Change-Id: I305ea7bb2633704053a1f8de1e11b037b9fc8a76
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/53086
Commit-Queue: Bob Beck <bbe@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
diff --git a/crypto/asn1/f_int.c b/crypto/asn1/f_int.c
index 33da2dc..84bf667 100644
--- a/crypto/asn1/f_int.c
+++ b/crypto/asn1/f_int.c
@@ -63,30 +63,35 @@
static const char *h = "0123456789ABCDEF";
char buf[2];
- if (a == NULL)
+ if (a == NULL) {
return (0);
+ }
if (a->type & V_ASN1_NEG) {
- if (BIO_write(bp, "-", 1) != 1)
+ if (BIO_write(bp, "-", 1) != 1) {
goto err;
+ }
n = 1;
}
if (a->length == 0) {
- if (BIO_write(bp, "00", 2) != 2)
+ if (BIO_write(bp, "00", 2) != 2) {
goto err;
+ }
n += 2;
} else {
for (i = 0; i < a->length; i++) {
if ((i != 0) && (i % 35 == 0)) {
- if (BIO_write(bp, "\\\n", 2) != 2)
+ if (BIO_write(bp, "\\\n", 2) != 2) {
goto err;
+ }
n += 2;
}
buf[0] = h[((unsigned char)a->data[i] >> 4) & 0x0f];
buf[1] = h[((unsigned char)a->data[i]) & 0x0f];
- if (BIO_write(bp, buf, 2) != 2)
+ if (BIO_write(bp, buf, 2) != 2) {
goto err;
+ }
n += 2;
}
}