Skip to content

Commit f00088e

Browse files
author
tb
committed
bio chain test: minor readability tweaks
1 parent f4f8a2c commit f00088e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/regress/lib/libcrypto/bio/bio_chain.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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 $ */
22
/*
33
* Copyright (c) 2022 Theo Buehler <tb@openbsd.org>
44
*
@@ -27,7 +27,7 @@
2727
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
2828
#endif
2929

30-
#define CHAIN_POP_LEN 5
30+
#define CHAIN_POP_LEN 5
3131
#define LINK_CHAIN_A_LEN 8
3232
#define LINK_CHAIN_B_LEN 5
3333

@@ -360,8 +360,9 @@ link_chains_at(size_t i, size_t j, int use_bio_push)
360360

361361
/* If we push B[0] or set next to B[0], the oldhead chain is empty. */
362362
if (j == 0) {
363-
oldhead_len = 0;
364363
oldhead_start = NULL;
364+
oldhead_end = NULL;
365+
oldhead_len = 0;
365366
}
366367

367368
if (use_bio_push) {
@@ -409,11 +410,11 @@ link_chains_at(size_t i, size_t j, int use_bio_push)
409410
goto err;
410411

411412
/*
412-
* All sanity checks passed. We can now free the our chains
413+
* All sanity checks passed. We can now free the chains
413414
* with the BIO API without risk of leaks or double frees.
414415
*/
415416

416-
BIO_free_all(A[0]);
417+
BIO_free_all(new_start);
417418
BIO_free_all(oldhead_start);
418419
BIO_free_all(oldtail_start);
419420

0 commit comments

Comments
 (0)