summaryrefslogtreecommitdiff
path: root/lib/libcrypto
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-06-15 15:44:40 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-06-15 15:44:40 +0000
commit3e500571f01fd684b5ca6ccf9710ac9828620bb7 (patch)
tree3bc2a41fd69bfd0824e16092f197452cb0d6bd24 /lib/libcrypto
parent6cb005bb98154d6307cf0e81b500fd43541a88cb (diff)
Simplify EVP_CIPHER_CTX_new() - stop pretending that EVP_CIPHER_CTX_init()
does something special... just use calloc() instead. ok beck@ miod@
Diffstat (limited to 'lib/libcrypto')
-rw-r--r--lib/libcrypto/evp/evp_enc.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/libcrypto/evp/evp_enc.c b/lib/libcrypto/evp/evp_enc.c
index d650d285df9..5c3da7c4767 100644
--- a/lib/libcrypto/evp/evp_enc.c
+++ b/lib/libcrypto/evp/evp_enc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: evp_enc.c,v 1.19 2014/06/12 15:49:29 deraadt Exp $ */
+/* $OpenBSD: evp_enc.c,v 1.20 2014/06/15 15:44:39 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -74,16 +74,12 @@ void
EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx)
{
memset(ctx, 0, sizeof(EVP_CIPHER_CTX));
- /* ctx->cipher=NULL; */
}
EVP_CIPHER_CTX *
EVP_CIPHER_CTX_new(void)
{
- EVP_CIPHER_CTX *ctx = malloc(sizeof *ctx);
- if (ctx)
- EVP_CIPHER_CTX_init(ctx);
- return ctx;
+ return calloc(1, sizeof(EVP_CIPHER_CTX));
}
int