diff options
author | Richard Levitte <levitte@openssl.org> | 2016-09-14 20:54:30 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2016-09-15 23:24:06 +0200 |
commit | c7bdb6a31ff0fcae66b451d3f80a684ad77f4966 (patch) | |
tree | ba5f6d71cc323c603ffc23a87236123a3759fcf7 /apps/s_client.c | |
parent | 0d0723e813870c2e7a009ec47e933668a1548531 (diff) |
Reformat to fit OpenSSL source code standards
Reviewed-by: Andy Polyakov <appro@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'apps/s_client.c')
-rw-r--r-- | apps/s_client.c | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/apps/s_client.c b/apps/s_client.c index 8d07cc4d73..820bffe8b4 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -861,10 +861,10 @@ int s_client_main(int argc, char **argv) int c_nbio = 0, c_msg = 0, c_ign_eof = 0, c_brief = 0; int c_tlsextdebug = 0, c_status_req = 0; BIO *bio_c_msg = NULL; -#if defined(OPENSSL_SYS_VMS) +#if defined(OPENSSL_SYS_VMS) int stdin_sock; TerminalSocket(TERM_SOCK_CREATE, &stdin_sock); -#endif +#endif FD_ZERO(&readfds); FD_ZERO(&writefds); @@ -1828,12 +1828,12 @@ int s_client_main(int argc, char **argv) SSL_set_connect_state(con); /* ok, lets connect */ -#if defined(OPENSSL_SYS_VMS) +#if defined(OPENSSL_SYS_VMS) if (stdin_sock > SSL_get_fd(con)) width = stdin_sock + 1; else width = SSL_get_fd(con) + 1; -#else +#else width = SSL_get_fd(con) + 1; #endif read_tty = 1; @@ -2296,7 +2296,7 @@ int s_client_main(int argc, char **argv) goto shut; } } -#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_VMS) +#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS) || defined(OPENSSL_SYS_VMS) /* Assume Windows/DOS/BeOS can always write */ else if (!ssl_pending && write_tty) #else @@ -2388,25 +2388,20 @@ int s_client_main(int argc, char **argv) /* OPENSSL_SYS_MSDOS includes OPENSSL_SYS_WINDOWS */ #if defined(OPENSSL_SYS_MSDOS) else if (has_stdin_waiting()) +#elif defined(OPENSSL_SYS_VMS) + else if (FD_ISSET(stdin_sock, &readfds)) #else - -#if defined(OPENSSL_SYS_VMS) - else if (FD_ISSET(stdin_sock,&readfds)) -#else - else if (FD_ISSET(fileno(stdin),&readfds)) -#endif - + else if (FD_ISSET(fileno(stdin), &readfds)) #endif { if (crlf) { int j, lf_num; +#if defined(OPENSSL_SYS_VMS) + i = recv(stdin_sock, cbuf, BUFSIZZ / 2, 0); +#else i = raw_read_stdin(cbuf, BUFSIZZ / 2); - #if defined(OPENSSL_SYS_VMS) - i = recv(stdin_sock, cbuf, BUFSIZZ/2, 0); - #else - i = raw_read_stdin(cbuf, BUFSIZZ/2); - #endif +#endif lf_num = 0; /* both loops are skipped when i <= 0 */ @@ -2422,14 +2417,13 @@ int s_client_main(int argc, char **argv) } } assert(lf_num == 0); - } else - { - #if defined(OPENSSL_SYS_VMS) - i = recv(stdin_sock, cbuf, BUFSIZZ, 0); - #else - i = raw_read_stdin(cbuf, BUFSIZZ); - #endif - } + } else { +#if defined(OPENSSL_SYS_VMS) + i = recv(stdin_sock, cbuf, BUFSIZZ, 0); +#else + i = raw_read_stdin(cbuf, BUFSIZZ); +#endif + } #if !defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS) if (i == 0) at_eof = 1; @@ -2514,7 +2508,7 @@ int s_client_main(int argc, char **argv) bio_c_out = NULL; BIO_free(bio_c_msg); bio_c_msg = NULL; -#if defined(OPENSSL_SYS_VMS) +#if defined(OPENSSL_SYS_VMS) TerminalSocket(TERM_SOCK_DELETE, &stdin_sock); #endif return (ret); |