diff options
| author | tb <> | 2022-12-08 18:33:20 +0000 |
|---|---|---|
| committer | tb <> | 2022-12-08 18:33:20 +0000 |
| commit | d30f60e7eb24406d70bf01f67e7889de4f46c1e3 (patch) | |
| tree | a9136112c3ff9ead29320205a9c8824e1c9dc939 | |
| parent | 6e3363fa61c8dcc03591bd32deafbd81a3f2774e (diff) | |
| download | openbsd-d30f60e7eb24406d70bf01f67e7889de4f46c1e3.tar.gz openbsd-d30f60e7eb24406d70bf01f67e7889de4f46c1e3.tar.bz2 openbsd-d30f60e7eb24406d70bf01f67e7889de4f46c1e3.zip | |
bio chain test: minor readability tweaks
| -rw-r--r-- | src/regress/lib/libcrypto/bio/bio_chain.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/regress/lib/libcrypto/bio/bio_chain.c b/src/regress/lib/libcrypto/bio/bio_chain.c index dce864fdfa..1dbcdd0669 100644 --- a/src/regress/lib/libcrypto/bio/bio_chain.c +++ b/src/regress/lib/libcrypto/bio/bio_chain.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bio_chain.c,v 1.5 2022/12/08 18:16:28 tb Exp $ */ | 1 | /* $OpenBSD: bio_chain.c,v 1.6 2022/12/08 18:33:20 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2022 Theo Buehler <tb@openbsd.org> | 3 | * Copyright (c) 2022 Theo Buehler <tb@openbsd.org> |
| 4 | * | 4 | * |
| @@ -27,7 +27,7 @@ | |||
| 27 | #define nitems(_a) (sizeof((_a)) / sizeof((_a)[0])) | 27 | #define nitems(_a) (sizeof((_a)) / sizeof((_a)[0])) |
| 28 | #endif | 28 | #endif |
| 29 | 29 | ||
| 30 | #define CHAIN_POP_LEN 5 | 30 | #define CHAIN_POP_LEN 5 |
| 31 | #define LINK_CHAIN_A_LEN 8 | 31 | #define LINK_CHAIN_A_LEN 8 |
| 32 | #define LINK_CHAIN_B_LEN 5 | 32 | #define LINK_CHAIN_B_LEN 5 |
| 33 | 33 | ||
| @@ -360,8 +360,9 @@ link_chains_at(size_t i, size_t j, int use_bio_push) | |||
| 360 | 360 | ||
| 361 | /* If we push B[0] or set next to B[0], the oldhead chain is empty. */ | 361 | /* If we push B[0] or set next to B[0], the oldhead chain is empty. */ |
| 362 | if (j == 0) { | 362 | if (j == 0) { |
| 363 | oldhead_len = 0; | ||
| 364 | oldhead_start = NULL; | 363 | oldhead_start = NULL; |
| 364 | oldhead_end = NULL; | ||
| 365 | oldhead_len = 0; | ||
| 365 | } | 366 | } |
| 366 | 367 | ||
| 367 | if (use_bio_push) { | 368 | if (use_bio_push) { |
| @@ -409,11 +410,11 @@ link_chains_at(size_t i, size_t j, int use_bio_push) | |||
| 409 | goto err; | 410 | goto err; |
| 410 | 411 | ||
| 411 | /* | 412 | /* |
| 412 | * All sanity checks passed. We can now free the our chains | 413 | * All sanity checks passed. We can now free the chains |
| 413 | * with the BIO API without risk of leaks or double frees. | 414 | * with the BIO API without risk of leaks or double frees. |
| 414 | */ | 415 | */ |
| 415 | 416 | ||
| 416 | BIO_free_all(A[0]); | 417 | BIO_free_all(new_start); |
| 417 | BIO_free_all(oldhead_start); | 418 | BIO_free_all(oldhead_start); |
| 418 | BIO_free_all(oldtail_start); | 419 | BIO_free_all(oldtail_start); |
| 419 | 420 | ||
