mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-16 08:42:50 +00:00
Use initializers in alloc functions
Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
31003ffa46
commit
9db14486da
@ -8501,8 +8501,7 @@ psa_status_t psa_crypto_local_input_alloc(const uint8_t *input, size_t input_len
|
||||
{
|
||||
psa_status_t status;
|
||||
|
||||
local_input->buffer = NULL;
|
||||
local_input->length = 0;
|
||||
*local_input = PSA_CRYPTO_LOCAL_INPUT_INIT;
|
||||
|
||||
if (input_len == 0) {
|
||||
return PSA_SUCCESS;
|
||||
@ -8543,9 +8542,7 @@ void psa_crypto_local_input_free(psa_crypto_local_input_t *local_input)
|
||||
psa_status_t psa_crypto_local_output_alloc(uint8_t *output, size_t output_len,
|
||||
psa_crypto_local_output_t *local_output)
|
||||
{
|
||||
local_output->original = NULL;
|
||||
local_output->buffer = NULL;
|
||||
local_output->length = 0;
|
||||
*local_output = PSA_CRYPTO_LOCAL_OUTPUT_INIT;
|
||||
|
||||
if (output_len == 0) {
|
||||
return PSA_SUCCESS;
|
||||
|
Loading…
x
Reference in New Issue
Block a user