Rename parameter name

Rename `obsolete_ctx` to `unused_ctx` as it is simply unused.
pull/7099/head
Ron Eldor 2018-08-31 13:53:29 +03:00
parent 666ebe392a
commit c1b6fdc5af
2 changed files with 4 additions and 5 deletions

View File

@ -49,7 +49,7 @@ mbedtls_platform_context;
* implementation is platform-specific, and its implementation MUST be provided. * implementation is platform-specific, and its implementation MUST be provided.
* *
*/ */
int crypto_platform_setup( crypto_platform_ctx *ctx ); int crypto_platform_setup( crypto_platform_ctx *unused_ctx );
/** /**
* \brief This function performs any platform teardown operations, to disable cryptographic operations. * \brief This function performs any platform teardown operations, to disable cryptographic operations.
@ -60,7 +60,7 @@ int crypto_platform_setup( crypto_platform_ctx *ctx );
* Its implementation is platform-specific,and its implementation MUST be provided. * Its implementation is platform-specific,and its implementation MUST be provided.
* *
*/ */
void crypto_platform_terminate( crypto_platform_ctx *ctx ); void crypto_platform_terminate( crypto_platform_ctx *unused_ctx );
#endif #endif
#endif /* __PLATFORM_ALT__ */ #endif /* __PLATFORM_ALT__ */

View File

@ -24,7 +24,7 @@
mbedtls_platform_context ctx = { }; mbedtls_platform_context ctx = { };
int mbedtls_platform_setup( mbedtls_platform_context *obsolete_ctx ) int mbedtls_platform_setup( mbedtls_platform_context *unused_ctx )
{ {
int ret = 0; int ret = 0;
@ -38,9 +38,8 @@ int mbedtls_platform_setup( mbedtls_platform_context *obsolete_ctx )
return ( ret ); return ( ret );
} }
void mbedtls_platform_teardown( mbedtls_platform_context *obsolete_ctx ) void mbedtls_platform_teardown( mbedtls_platform_context *unused_ctx )
{ {
core_util_atomic_decr_u32( ( volatile uint32_t * )&ctx.reference_count, 1 ); core_util_atomic_decr_u32( ( volatile uint32_t * )&ctx.reference_count, 1 );
if( ctx.reference_count < 1 ) if( ctx.reference_count < 1 )
{ {