From 16f8d4ebf0fd4847fa83d9c61f4150273cb4f533 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Mon, 4 May 2015 18:00:15 -0400 Subject: memset, memcpy, sizeof consistency fixes Just as with the OPENSSL_malloc calls, consistently use sizeof(*ptr) for memset and memcpy. Remove needless casts for those functions. For memset, replace alternative forms of zero with 0. Reviewed-by: Richard Levitte --- ssl/ssl_sess.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ssl/ssl_sess.c') diff --git a/ssl/ssl_sess.c b/ssl/ssl_sess.c index b592da4dae..4e73f047e0 100644 --- a/ssl/ssl_sess.c +++ b/ssl/ssl_sess.c @@ -198,7 +198,7 @@ SSL_SESSION *SSL_SESSION_new(void) SSLerr(SSL_F_SSL_SESSION_NEW, ERR_R_MALLOC_FAILURE); return (0); } - memset(ss, 0, sizeof(SSL_SESSION)); + memset(ss, 0, sizeof(*ss)); ss->verify_result = 1; /* avoid 0 (= X509_V_OK) just in case */ ss->references = 1; -- cgit v1.2.3