summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2022-03-15 18:29:12 +0000
committertb <>2022-03-15 18:29:12 +0000
commita9f82f4ee7d4a631dd91adefede4c9fb14e54b44 (patch)
tree68fa61b44a8284f7bf36b13a48efe96d7f2c38ed
parenta30a99d65aa72b3d8775fa8cfe722b67ac5d4263 (diff)
downloadopenbsd-a9f82f4ee7d4a631dd91adefede4c9fb14e54b44.tar.gz
openbsd-a9f82f4ee7d4a631dd91adefede4c9fb14e54b44.tar.bz2
openbsd-a9f82f4ee7d4a631dd91adefede4c9fb14e54b44.zip
Check BIO_reset() return value to make gcc happy.
-rw-r--r--src/regress/lib/libcrypto/asn1/asn1object.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/regress/lib/libcrypto/asn1/asn1object.c b/src/regress/lib/libcrypto/asn1/asn1object.c
index 2c43f0edc4..77ebae6616 100644
--- a/src/regress/lib/libcrypto/asn1/asn1object.c
+++ b/src/regress/lib/libcrypto/asn1/asn1object.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1object.c,v 1.3 2022/03/05 14:16:13 jsing Exp $ */ 1/* $OpenBSD: asn1object.c,v 1.4 2022/03/15 18:29:12 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2017, 2021, 2022 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2017, 2021, 2022 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -453,7 +453,10 @@ asn1_object_txt_test(void)
453 goto failed; 453 goto failed;
454 } 454 }
455 455
456 BIO_reset(bio); 456 if ((ret = BIO_reset(bio)) <= 0) {
457 fprintf(stderr, "FAIL: BIO_reset failed: ret = %d\n", ret);
458 goto failed;
459 }
457 ret = i2a_ASN1_OBJECT(bio, aobj); 460 ret = i2a_ASN1_OBJECT(bio, aobj);
458 if (ret < 0 || (unsigned long)ret != strlen(obj_txt)) { 461 if (ret < 0 || (unsigned long)ret != strlen(obj_txt)) {
459 fprintf(stderr, "FAIL: i2a_ASN1_OBJECT() returned %d, " 462 fprintf(stderr, "FAIL: i2a_ASN1_OBJECT() returned %d, "