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
|
|
@ -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 );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue