Skip to content

Commit 173c1a2

Browse files
Ron EldorRon Eldor
authored andcommitted
Style fixes
Fix alignments and remove extra lines and spaces.
1 parent 55c4a6d commit 173c1a2

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

benchmark/main.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,14 @@ do { \
188188
{ \
189189
mbedtls_printf("Feature unsupported\n"); \
190190
break; \
191-
} else if (ret != 0) { \
191+
} \
192+
else if (ret != 0) \
193+
{ \
192194
PRINT_ERROR(ret, "Public function"); \
193195
goto exit; \
194-
} else { \
196+
} \
197+
else \
198+
{ \
195199
mbedtls_printf("%6lu ms/" TYPE, ms); \
196200
mbedtls_printf("\n"); \
197201
} \
@@ -1086,7 +1090,7 @@ MBED_NOINLINE static int benchmark_ecdsa()
10861090
mbedtls_ecdsa_init(&ecdsa);
10871091

10881092
ret = mbedtls_snprintf(title, sizeof(title), "ECDSA-%s",
1089-
curve_info->name);
1093+
curve_info->name);
10901094
if (ret < 0 || static_cast<size_t>(ret) >= sizeof(title)) {
10911095
mbedtls_printf("Failed to compose title string using "
10921096
"mbedtls_snprintf(): %d\n", ret);
@@ -1239,8 +1243,6 @@ MBED_NOINLINE static int benchmark_ecdh()
12391243

12401244
ecp_clear_precomputed(&ecdh.grp);
12411245

1242-
1243-
12441246
/*
12451247
* Benchmarking this requires two function calls that can fail. We
12461248
* add a check in between them to check for any errors. In normal
@@ -1354,8 +1356,9 @@ MBED_NOINLINE static int benchmark_ecdh_curve22519()
13541356
mbedtls_mpi_init(&z);
13551357

13561358
ret = mbedtls_snprintf(title, sizeof(title), "ECDHE-Curve25519");
1357-
if (ret < 0 || static_cast<size_t>(ret) >= sizeof(title)) {
1358-
mbedtls_printf("Failed to compose title string using "
1359+
if (ret < 0 || static_cast<size_t>(ret) >= sizeof(title))
1360+
{
1361+
mbedtls_printf("Failed to compose title string using "
13591362
"mbedtls_snprintf(): %d\n", ret);
13601363
goto exit;
13611364
}

0 commit comments

Comments
 (0)