mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 08:16:33 +01:00
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
fd9afb29d3
commit
c531b4af3c
16 changed files with 46 additions and 46 deletions
|
|
@ -109,7 +109,7 @@ int mpi_grow( mpi *X, size_t nblimbs )
|
|||
|
||||
if( X->n < nblimbs )
|
||||
{
|
||||
if( ( p = (t_uint *) polarssl_malloc( nblimbs * ciL ) ) == NULL )
|
||||
if( ( p = polarssl_malloc( nblimbs * ciL ) ) == NULL )
|
||||
return( POLARSSL_ERR_MPI_MALLOC_FAILED );
|
||||
|
||||
memset( p, 0, nblimbs * ciL );
|
||||
|
|
@ -149,7 +149,7 @@ int mpi_shrink( mpi *X, size_t nblimbs )
|
|||
if( i < nblimbs )
|
||||
i = nblimbs;
|
||||
|
||||
if( ( p = (t_uint *) polarssl_malloc( i * ciL ) ) == NULL )
|
||||
if( ( p = polarssl_malloc( i * ciL ) ) == NULL )
|
||||
return( POLARSSL_ERR_MPI_MALLOC_FAILED );
|
||||
|
||||
memset( p, 0, i * ciL );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue