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 <levitte@openssl.org>
This commit is contained in:
Rich Salz
2015-05-04 18:00:15 -04:00
committed by Rich Salz
parent 12048657a9
commit 16f8d4ebf0
76 changed files with 198 additions and 223 deletions

View File

@@ -12,7 +12,7 @@ COMP_CTX *COMP_CTX_new(COMP_METHOD *meth)
/* ZZZZZZZZZZZZZZZZ */
return (NULL);
}
memset(ret, 0, sizeof(COMP_CTX));
memset(ret, 0, sizeof(*ret));
ret->meth = meth;
if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
OPENSSL_free(ret);