summaryrefslogtreecommitdiffstats
path: root/crypto/bio/bss_null.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2018-01-31 15:24:24 +0100
committerRichard Levitte <levitte@openssl.org>2018-01-31 17:45:11 +0100
commit94f1c9379c3ed4b088718b35d0dd807d619d50c5 (patch)
tree298ddf803baf0e7b32e3741618f01610ab8e60c4 /crypto/bio/bss_null.c
parent7f55808fe723c146428415a470ed42331548007b (diff)
Remove "dummy" BIO create and destroy functions
They aren't needed if all they do is set bio->init = 1 and zero other fields that are already zeroed Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5223)
Diffstat (limited to 'crypto/bio/bss_null.c')
-rw-r--r--crypto/bio/bss_null.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/crypto/bio/bss_null.c b/crypto/bio/bss_null.c
index df3a9214f9..48164d4f90 100644
--- a/crypto/bio/bss_null.c
+++ b/crypto/bio/bss_null.c
@@ -17,8 +17,6 @@ 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);
static const BIO_METHOD null_method = {
BIO_TYPE_NULL,
"NULL",
@@ -31,8 +29,8 @@ static const BIO_METHOD null_method = {
null_puts,
null_gets,
null_ctrl,
- null_new,
- null_free,
+ NULL,
+ NULL,
NULL, /* null_callback_ctrl */
};
@@ -41,21 +39,6 @@ const BIO_METHOD *BIO_s_null(void)
return &null_method;
}
-static int null_new(BIO *bi)
-{
- bi->init = 1;
- bi->num = 0;
- bi->ptr = (NULL);
- return 1;
-}
-
-static int null_free(BIO *a)
-{
- if (a == NULL)
- return 0;
- return 1;
-}
-
static int null_read(BIO *b, char *out, int outl)
{
return 0;