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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user