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
diff --git a/programs/test/ssl_test.c b/programs/test/ssl_test.c
index 63c3220..8ecd9c1 100644
--- a/programs/test/ssl_test.c
+++ b/programs/test/ssl_test.c
@@ -295,8 +295,8 @@
}
}
- read_buf = (unsigned char *) polarssl_malloc( opt->buffer_size );
- write_buf = (unsigned char *) polarssl_malloc( opt->buffer_size );
+ read_buf = polarssl_malloc( opt->buffer_size );
+ write_buf = polarssl_malloc( opt->buffer_size );
if( read_buf == NULL || write_buf == NULL )
{