summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/b_print.c
diff options
context:
space:
mode:
authorbeck <>1999-09-29 04:37:45 +0000
committerbeck <>1999-09-29 04:37:45 +0000
commitde8f24ea083384bb66b32ec105dc4743c5663cdf (patch)
tree1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/bio/b_print.c
parentcb929d29896bcb87c2a97417fbd03e50078fc178 (diff)
downloadopenbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/bio/b_print.c')
-rw-r--r--src/lib/libcrypto/bio/b_print.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/lib/libcrypto/bio/b_print.c b/src/lib/libcrypto/bio/b_print.c
index cdadeb839a..f448004298 100644
--- a/src/lib/libcrypto/bio/b_print.c
+++ b/src/lib/libcrypto/bio/b_print.c
@@ -61,32 +61,27 @@
61 */ 61 */
62 62
63#include <stdio.h> 63#include <stdio.h>
64#include <stdarg.h>
64#include "cryptlib.h" 65#include "cryptlib.h"
65#include "bio.h" 66#include <openssl/bio.h>
66 67
67int BIO_printf ( VAR_PLIST( BIO *, bio ) ) 68int BIO_printf (BIO *bio, ...)
68VAR_ALIST
69 { 69 {
70 VAR_BDEFN(args, BIO *, bio); 70 va_list args;
71 char *format; 71 char *format;
72 int ret; 72 int ret;
73 MS_STATIC char hugebuf[1024*2]; /* 10k in one chunk is the limit */ 73 MS_STATIC char hugebuf[1024*2]; /* 10k in one chunk is the limit */
74 74
75 VAR_INIT(args, BIO *, bio); 75 va_start(args, bio);
76 VAR_ARG(args, char *, format); 76 format=va_arg(args, char *);
77 77
78 hugebuf[0]='\0'; 78 hugebuf[0]='\0';
79 79
80/* no-one uses _doprnt anymore and it appears to be broken under SunOS 4.1.4 */
81#if 0 && defined(sun) && !defined(VAR_ANSI) /**/
82 _doprnt(hugebuf,format,args);
83#else /* !sun */
84 vsprintf(hugebuf,format,args); 80 vsprintf(hugebuf,format,args);
85#endif /* sun */
86 81
87 ret=BIO_write(bio,hugebuf,strlen(hugebuf)); 82 ret=BIO_write(bio,hugebuf,strlen(hugebuf));
88 83
89 VAR_END( args ); 84 va_end(args);
90 return(ret); 85 return(ret);
91 } 86 }
92 87