diff options
author | Rich Salz <rsalz@akamai.com> | 2015-09-03 09:15:26 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-09-03 16:26:34 -0400 |
commit | 64b25758edca688a30f02c260262150f7ad0bc7d (patch) | |
tree | 15ad5a8c7985e2b27aaf7a14737fd980a36349dd /crypto/evp/bio_enc.c | |
parent | fb4844bbc62fb014c115cd8fd2fc4304cba6eb89 (diff) | |
download | openssl-64b25758edca688a30f02c260262150f7ad0bc7d.tar.gz |
remove 0 assignments.
After openssl_zalloc, cleanup more "set to 0/NULL" assignments.
Many are from github feedback.
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'crypto/evp/bio_enc.c')
-rw-r--r-- | crypto/evp/bio_enc.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/crypto/evp/bio_enc.c b/crypto/evp/bio_enc.c index bf74a0ac72..2e6ce33e4e 100644 --- a/crypto/evp/bio_enc.c +++ b/crypto/evp/bio_enc.c @@ -112,17 +112,13 @@ static int enc_new(BIO *bi) { BIO_ENC_CTX *ctx; - ctx = OPENSSL_malloc(sizeof(*ctx)); + ctx = OPENSSL_zalloc(sizeof(*ctx)); if (ctx == NULL) return (0); - EVP_CIPHER_CTX_init(&ctx->cipher); - ctx->buf_len = 0; - ctx->buf_off = 0; + EVP_CIPHER_CTX_init(&ctx->cipher); ctx->cont = 1; - ctx->finished = 0; ctx->ok = 1; - bi->init = 0; bi->ptr = (char *)ctx; bi->flags = 0; |