X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Fbio%2Fbss_null.c;h=46b73339dff8f5aebe6ea2ff6fe8553cdb82eb2a;hp=b2eb9ad141705485c184ab76a4883ac623511984;hb=2335e8a9ccdaf62eabc37c8b9b80195285ed887d;hpb=ec577822f95a8bca0023c5c77cef1a4916822d4a diff --git a/crypto/bio/bss_null.c b/crypto/bio/bss_null.c index b2eb9ad141..46b73339df 100644 --- a/crypto/bio/bss_null.c +++ b/crypto/bio/bss_null.c @@ -61,24 +61,13 @@ #include "cryptlib.h" #include -#ifndef NOPROTO -static int null_write(BIO *h,char *buf,int num); -static int null_read(BIO *h,char *buf,int size); -static int null_puts(BIO *h,char *str); -static int null_gets(BIO *h,char *str,int size); -static long null_ctrl(BIO *h,int cmd,long arg1,char *arg2); +static int null_write(BIO *h, const char *buf, int num); +static int null_read(BIO *h, char *buf, int size); +static int null_puts(BIO *h, const char *str); +static int null_gets(BIO *h, char *str, int size); +static long null_ctrl(BIO *h, int cmd, long arg1, void *arg2); static int null_new(BIO *h); static int null_free(BIO *data); -#else -static int null_write(); -static int null_read(); -static int null_puts(); -static int null_gets(); -static long null_ctrl(); -static int null_new(); -static int null_free(); -#endif - static BIO_METHOD null_method= { BIO_TYPE_NULL, @@ -90,6 +79,7 @@ static BIO_METHOD null_method= null_ctrl, null_new, null_free, + NULL, }; BIO_METHOD *BIO_s_null(void) @@ -116,12 +106,12 @@ static int null_read(BIO *b, char *out, int outl) return(0); } -static int null_write(BIO *b, char *in, int inl) +static int null_write(BIO *b, const char *in, int inl) { return(inl); } -static long null_ctrl(BIO *b, int cmd, long num, char *ptr) +static long null_ctrl(BIO *b, int cmd, long num, void *ptr) { long ret=1; @@ -152,7 +142,7 @@ static int null_gets(BIO *bp, char *buf, int size) return(0); } -static int null_puts(BIO *bp, char *str) +static int null_puts(BIO *bp, const char *str) { if (str == NULL) return(0); return(strlen(str));