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 committed by Manuel Pégourié-Gonnard
parent fd9afb29d3
commit c531b4af3c
16 changed files with 46 additions and 46 deletions

View file

@ -451,7 +451,7 @@ int x509_get_name( unsigned char **p, const unsigned char *end,
/* Mark this item as being only one in a set */
cur->next_merged = 1;
cur->next = (x509_name *) polarssl_malloc( sizeof( x509_name ) );
cur->next = polarssl_malloc( sizeof( x509_name ) );
if( cur->next == NULL )
return( POLARSSL_ERR_X509_MALLOC_FAILED );
@ -467,7 +467,7 @@ int x509_get_name( unsigned char **p, const unsigned char *end,
if( *p == end )
return( 0 );
cur->next = (x509_name *) polarssl_malloc( sizeof( x509_name ) );
cur->next = polarssl_malloc( sizeof( x509_name ) );
if( cur->next == NULL )
return( POLARSSL_ERR_X509_MALLOC_FAILED );