-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bio chain test: make two errors noisy
- Loading branch information
tb
committed
Dec 9, 2022
1 parent
ab735ec
commit 8c9d176
Showing
1 changed file
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/* $OpenBSD: bio_chain.c,v 1.9 2022/12/09 07:47:59 tb Exp $ */ | ||
/* $OpenBSD: bio_chain.c,v 1.10 2022/12/09 07:53:06 tb Exp $ */ | ||
/* | ||
* Copyright (c) 2022 Theo Buehler <[email protected]> | ||
* | ||
|
@@ -201,8 +201,12 @@ walk_forward(BIO *start, BIO *end, size_t expected_len, size_t i, size_t j, | |
int ret = 0; | ||
|
||
if (start == NULL || end == NULL) { | ||
if (expected_len != 0) | ||
if (expected_len != 0) { | ||
fprintf(stderr, "%s case (%zu, %zu) %s: empty chain " | ||
"with expected length %zu > 0\n", | ||
fn, i, j, description, expected_len); | ||
goto err; | ||
} | ||
goto done; | ||
} | ||
|
||
|
@@ -244,8 +248,12 @@ walk_backward(BIO *start, BIO *end, size_t expected_len, size_t i, size_t j, | |
int ret = 0; | ||
|
||
if (start == NULL || end == NULL) { | ||
if (expected_len != 0) | ||
if (expected_len != 0) { | ||
fprintf(stderr, "%s case (%zu, %zu) %s: empty chain " | ||
"with expected length %zu > 0\n", | ||
fn, i, j, description, expected_len); | ||
goto err; | ||
} | ||
goto done; | ||
} | ||
|
||
|