Apply the semantic patch rm-malloc-cast.cocci.
for dir in library programs; do spatch --sp-file scripts/rm-malloc-cast.cocci --dir $dir \ --in-place; done
This commit is contained in:
parent
5b535de474
commit
369e6c20b3
16 changed files with 46 additions and 46 deletions
|
@ -812,7 +812,7 @@ static int ecp_normalize_jac_many( const ecp_group *grp,
|
|||
if( t_len < 2 )
|
||||
return( ecp_normalize_jac( grp, *T ) );
|
||||
|
||||
if( ( c = (mpi *) polarssl_malloc( t_len * sizeof( mpi ) ) ) == NULL )
|
||||
if( ( c = polarssl_malloc( t_len * sizeof( mpi ) ) ) == NULL )
|
||||
return( POLARSSL_ERR_ECP_MALLOC_FAILED );
|
||||
|
||||
mpi_init( &u ); mpi_init( &Zi ); mpi_init( &ZZi );
|
||||
|
@ -1415,7 +1415,7 @@ static int ecp_mul_comb( ecp_group *grp, ecp_point *R,
|
|||
|
||||
if( T == NULL )
|
||||
{
|
||||
T = (ecp_point *) polarssl_malloc( pre_len * sizeof( ecp_point ) );
|
||||
T = polarssl_malloc( pre_len * sizeof( ecp_point ) );
|
||||
if( T == NULL )
|
||||
{
|
||||
ret = POLARSSL_ERR_ECP_MALLOC_FAILED;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue