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)
static int nullf_puts(BIO *h, const char *str);
static int nullf_gets(BIO *h, char *str, int size);
static long nullf_ctrl(BIO *h, int cmd, long arg1, void *arg2);
static int nullf_puts(BIO *h, const char *str);
static int nullf_gets(BIO *h, char *str, int size);
static long nullf_ctrl(BIO *h, int cmd, long arg1, void *arg2);
-static int nullf_new(BIO *h);
-static int nullf_free(BIO *data);
static long nullf_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
static const BIO_METHOD methods_nullf = {
BIO_TYPE_NULL_FILTER,
static long nullf_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
static const BIO_METHOD methods_nullf = {
BIO_TYPE_NULL_FILTER,
nullf_puts,
nullf_gets,
nullf_ctrl,
nullf_puts,
nullf_gets,
nullf_ctrl,
- nullf_new,
- nullf_free,
-static int nullf_new(BIO *bi)
-{
- bi->init = 1;
- bi->ptr = NULL;
- bi->flags = 0;
- return 1;
-}
-
-static int nullf_free(BIO *a)
-{
- if (a == NULL)
- return 0;
- /*-
- a->ptr=NULL;
- a->init=0;
- a->flags=0;
- */
- return 1;
-}
-
static int nullf_read(BIO *b, char *out, int outl)
{
int ret = 0;
static int nullf_read(BIO *b, char *out, int outl)
{
int ret = 0;
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_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",
static const BIO_METHOD null_method = {
BIO_TYPE_NULL,
"NULL",
null_puts,
null_gets,
null_ctrl,
null_puts,
null_gets,
null_ctrl,
NULL, /* null_callback_ctrl */
};
NULL, /* null_callback_ctrl */
};
-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;
static int null_read(BIO *b, char *out, int outl)
{
return 0;