Hi

As far as I can tell, this ends up calling vprintf eventually, so
skip the steps inbetween.

Best,

Martin

Index: err_prn.c
===================================================================
RCS file: /home/reposync/cvs/src/lib/libcrypto/err/err_prn.c,v
retrieving revision 1.19
diff -u -p -r1.19 err_prn.c
--- err_prn.c   7 Jan 2022 09:02:18 -0000       1.19
+++ err_prn.c   7 Jan 2022 16:13:48 -0000
@@ -92,12 +92,7 @@ ERR_print_errors_cb(int (*cb)(const char
 static int
 print_fp(const char *str, size_t len, void *fp)
 {
-       BIO bio;
-
-       BIO_set(&bio, BIO_s_file());
-       BIO_set_fp(&bio, fp, BIO_NOCLOSE);
-
-       return BIO_printf(&bio, "%s", str);
+       return fprintf(fp, "%s", str);
 }
 
 void

Reply via email to