mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Remove a few redundant memset after calloc.
Using the following semantic patch provided by Mansour Moufid: @@ expression x; @@ x = mbedtls_calloc(...) ... - memset(x, 0, ...);
This commit is contained in:
@ -457,8 +457,6 @@ int mbedtls_x509_get_name( unsigned char **p, const unsigned char *end,
|
||||
if( cur->next == NULL )
|
||||
return( MBEDTLS_ERR_X509_MALLOC_FAILED );
|
||||
|
||||
memset( cur->next, 0, sizeof( mbedtls_x509_name ) );
|
||||
|
||||
cur = cur->next;
|
||||
}
|
||||
|
||||
@ -473,8 +471,6 @@ int mbedtls_x509_get_name( unsigned char **p, const unsigned char *end,
|
||||
if( cur->next == NULL )
|
||||
return( MBEDTLS_ERR_X509_MALLOC_FAILED );
|
||||
|
||||
memset( cur->next, 0, sizeof( mbedtls_x509_name ) );
|
||||
|
||||
cur = cur->next;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user