From d19894fb4d97c25950841e307097b7ffc365984e Mon Sep 17 00:00:00 2001 From: Yanray Wang Date: Thu, 16 Mar 2023 11:47:39 +0800 Subject: [PATCH] ssl_helpers.c: unify code format between source file and header file Signed-off-by: Yanray Wang --- tests/include/test/ssl_helpers.h | 3 ++- tests/src/test_helpers/ssl_helpers.c | 13 ++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/include/test/ssl_helpers.h b/tests/include/test/ssl_helpers.h index b38c58aee1..281d1f55a9 100644 --- a/tests/include/test/ssl_helpers.h +++ b/tests/include/test/ssl_helpers.h @@ -345,7 +345,8 @@ void mbedtls_test_message_socket_init( int mbedtls_test_message_socket_setup( mbedtls_test_ssl_message_queue *queue_input, mbedtls_test_ssl_message_queue *queue_output, - size_t queue_capacity, mbedtls_test_mock_socket *socket, + size_t queue_capacity, + mbedtls_test_mock_socket *socket, mbedtls_test_message_socket_context *ctx); /* diff --git a/tests/src/test_helpers/ssl_helpers.c b/tests/src/test_helpers/ssl_helpers.c index d248e29359..a698f379b7 100644 --- a/tests/src/test_helpers/ssl_helpers.c +++ b/tests/src/test_helpers/ssl_helpers.c @@ -233,8 +233,8 @@ int mbedtls_test_ssl_buffer_get(mbedtls_test_ssl_buffer *buf, return (output_len > INT_MAX) ? INT_MAX : (int) output_len; } -int mbedtls_test_ssl_message_queue_setup(mbedtls_test_ssl_message_queue *queue, - size_t capacity) +int mbedtls_test_ssl_message_queue_setup( + mbedtls_test_ssl_message_queue *queue, size_t capacity) { queue->messages = (size_t *) mbedtls_calloc(capacity, sizeof(size_t)); if (NULL == queue->messages) { @@ -248,7 +248,8 @@ int mbedtls_test_ssl_message_queue_setup(mbedtls_test_ssl_message_queue *queue, return 0; } -void mbedtls_test_ssl_message_queue_free(mbedtls_test_ssl_message_queue *queue) +void mbedtls_test_ssl_message_queue_free( + mbedtls_test_ssl_message_queue *queue) { if (queue == NULL) { return; @@ -459,7 +460,8 @@ int mbedtls_test_mock_tcp_recv_nb(void *ctx, unsigned char *buf, size_t len) return mbedtls_test_ssl_buffer_get(socket->input, buf, len); } -void mbedtls_test_message_socket_init(mbedtls_test_message_socket_context *ctx) +void mbedtls_test_message_socket_init( + mbedtls_test_message_socket_context *ctx) { ctx->queue_input = NULL; ctx->queue_output = NULL; @@ -485,7 +487,8 @@ int mbedtls_test_message_socket_setup( return 0; } -void mbedtls_test_message_socket_close(mbedtls_test_message_socket_context *ctx) +void mbedtls_test_message_socket_close( + mbedtls_test_message_socket_context *ctx) { if (ctx == NULL) { return;