memory_buffer_alloc_init() now returns void

This commit is contained in:
Manuel Pégourié-Gonnard 2015-04-29 01:05:19 +02:00
parent 41d479e7df
commit 69a69cc5ae
3 changed files with 3 additions and 5 deletions

View file

@ -20,6 +20,7 @@ API Changes
mbedtls_gcm_init() -> mbedtls_gcm_setkey()
mbedtls_hmac_drbg_init() -> mbedtls_hmac_drbg_init(_buf)()
mbedtls_ctr_drbg_init() -> mbedtls_ctr_drbg_init(_buf)()
* mbedtls_memory_bufer_alloc_init() now returns void
* In the threading layer, mbedtls_mutex_init() and mbedtls_mutex_free() now
return void.
* ecdsa_write_signature() gained an addtional md_alg argument and

View file

@ -69,10 +69,8 @@ extern "C" {
*
* \param buf buffer to use as heap
* \param len size of the buffer
*
* \return 0 if successful
*/
int mbedtls_memory_buffer_alloc_init( unsigned char *buf, size_t len );
void mbedtls_memory_buffer_alloc_init( unsigned char *buf, size_t len );
/**
* \brief Free the mutex for thread-safety and clear remaining memory

View file

@ -561,7 +561,7 @@ static void buffer_alloc_free_mutexed( void *ptr )
}
#endif /* MBEDTLS_THREADING_C */
int mbedtls_memory_buffer_alloc_init( unsigned char *buf, size_t len )
void mbedtls_memory_buffer_alloc_init( unsigned char *buf, size_t len )
{
memset( &heap, 0, sizeof(buffer_alloc_ctx) );
memset( buf, 0, len );
@ -591,7 +591,6 @@ int mbedtls_memory_buffer_alloc_init( unsigned char *buf, size_t len )
heap.first->magic1 = MAGIC1;
heap.first->magic2 = MAGIC2;
heap.first_free = heap.first;
return( 0 );
}
void mbedtls_memory_buffer_alloc_free()