Fix some coding style issues.
This commit is contained in:
parent
d1e3be1f43
commit
0186d19aba
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!";
|
||||
int len = (int) XSTRLEN(msg);
|
||||
char input[1024];
|
||||
int idx;
|
||||
int ret, err;
|
||||
|
||||
if (!args)
|
||||
@ -41680,11 +41679,10 @@ static THREAD_RETURN WOLFSSL_THREAD SSL_read_test_server_thread(void* args)
|
||||
|
||||
/* read and write data */
|
||||
XMEMSET( input, 0, sizeof(input));
|
||||
idx = 0;
|
||||
|
||||
while (1) {
|
||||
ret = wolfSSL_read(ssl, input + idx, sizeof(input));
|
||||
ret = wolfSSL_read(ssl, input, sizeof(input));
|
||||
if (ret > 0) {
|
||||
idx += ret;
|
||||
break;
|
||||
}
|
||||
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 {
|
||||
ret = wolfSSL_write(ssl, msg, len);
|
||||
if (ret > 0) {
|
||||
@ -41710,8 +41708,6 @@ static THREAD_RETURN WOLFSSL_THREAD SSL_read_test_server_thread(void* args)
|
||||
continue;
|
||||
}
|
||||
|
||||
((func_args*)args)->return_code = TEST_SUCCESS;
|
||||
|
||||
/* wait for the peer to disconnect the tcp connection */
|
||||
do {
|
||||
ret = wolfSSL_read(ssl, input, sizeof(input));
|
||||
|
Loading…
x
Reference in New Issue
Block a user