mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 03:07:29 +02:00
Fix some coding style issues.
This commit is contained in:
10
tests/api.c
10
tests/api.c
@ -41614,7 +41614,6 @@ static THREAD_RETURN WOLFSSL_THREAD SSL_read_test_server_thread(void* args)
|
|||||||
char msg[] = "I hear you fa shizzle!";
|
char msg[] = "I hear you fa shizzle!";
|
||||||
int len = (int) XSTRLEN(msg);
|
int len = (int) XSTRLEN(msg);
|
||||||
char input[1024];
|
char input[1024];
|
||||||
int idx;
|
|
||||||
int ret, err;
|
int ret, err;
|
||||||
|
|
||||||
if (!args)
|
if (!args)
|
||||||
@ -41680,11 +41679,10 @@ static THREAD_RETURN WOLFSSL_THREAD SSL_read_test_server_thread(void* args)
|
|||||||
|
|
||||||
/* read and write data */
|
/* read and write data */
|
||||||
XMEMSET( input, 0, sizeof(input));
|
XMEMSET( input, 0, sizeof(input));
|
||||||
idx = 0;
|
|
||||||
while (1) {
|
while (1) {
|
||||||
ret = wolfSSL_read(ssl, input + idx, sizeof(input));
|
ret = wolfSSL_read(ssl, input, sizeof(input));
|
||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
idx += ret;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -41696,7 +41694,7 @@ static THREAD_RETURN WOLFSSL_THREAD SSL_read_test_server_thread(void* args)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err == WOLFSSL_ERROR_ZERO_RETURN || err == WOLFSSL_ERROR_WANT_READ) {
|
if (err == WOLFSSL_ERROR_ZERO_RETURN) {
|
||||||
do {
|
do {
|
||||||
ret = wolfSSL_write(ssl, msg, len);
|
ret = wolfSSL_write(ssl, msg, len);
|
||||||
if (ret > 0) {
|
if (ret > 0) {
|
||||||
@ -41710,8 +41708,6 @@ static THREAD_RETURN WOLFSSL_THREAD SSL_read_test_server_thread(void* args)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
((func_args*)args)->return_code = TEST_SUCCESS;
|
|
||||||
|
|
||||||
/* wait for the peer to disconnect the tcp connection */
|
/* wait for the peer to disconnect the tcp connection */
|
||||||
do {
|
do {
|
||||||
ret = wolfSSL_read(ssl, input, sizeof(input));
|
ret = wolfSSL_read(ssl, input, sizeof(input));
|
||||||
|
Reference in New Issue
Block a user