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:
Mansour Moufid 2015-02-15 17:35:38 -05:00
parent 5b535de474
commit 369e6c20b3
16 changed files with 46 additions and 46 deletions

View file

@ -107,7 +107,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 );
@ -147,7 +147,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 );