BIO_set_indent: fix return check
authorPeiwei Hu <jlu.hpw@foxmail.com>
Sun, 14 Nov 2021 15:46:47 +0000 (23:46 +0800)
committerTomas Mraz <tomas@openssl.org>
Mon, 22 Nov 2021 13:43:44 +0000 (14:43 +0100)
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17028)

test/bio_prefix_text.c

index 5eed72d66a1fdbdc9d08d62e877f1fde099b3f86..79ff8ec4a274c19596256a0246082fffc0a617c9 100644 (file)
@@ -211,7 +211,7 @@ static int setup(void)
                            progname, idx, amount - 1);
                 return 0;
             }
-            if (!BIO_set_indent(chain[idx], (long)indent)) {
+            if (BIO_set_indent(chain[idx], (long)indent) <= 0) {
                 BIO_printf(bio_err, "%s: failed setting indentation: %s",
                            progname, arg);
                 return 0;