diff options
author | x2018 <xkernel.wang@foxmail.com> | 2021-10-26 15:16:18 +0800 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-10-28 13:10:46 +1000 |
commit | 1287dabd0b23326be491125698dd982e4ae28887 (patch) | |
tree | 3d6a62803bdd3d8ca9378eda3e7316a9c995c001 | |
parent | 01451721afebabd0b7bdcd4cb3a183c9b590d266 (diff) |
fix some code with obvious wrong coding style
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16918)
116 files changed, 229 insertions, 230 deletions
diff --git a/apps/dgst.c b/apps/dgst.c index bd23b76996..e75dd72521 100644 --- a/apps/dgst.c +++ b/apps/dgst.c @@ -503,7 +503,7 @@ static const char *newline_escape_filename(const char *file, int * backslash) file_cpy = app_malloc(mem_len, file); i = 0; - while(e < length) { + while (e < length) { const char c = file[e]; if (c == '\n') { file_cpy[i++] = '\\'; diff --git a/apps/lib/app_libctx.c b/apps/lib/app_libctx.c index 4b9ec40e85..2f68cb0a75 100644 --- a/apps/lib/app_libctx.c +++ b/apps/lib/app_libctx.c @@ -36,7 +36,7 @@ OSSL_LIB_CTX *app_create_libctx(void) */ if (app_libctx == NULL) { if (!app_provider_load(NULL, "null")) { - opt_printf_stderr( "Failed to create null provider\n"); + opt_printf_stderr("Failed to create null provider\n"); return NULL; } app_libctx = OSSL_LIB_CTX_new(); diff --git a/apps/lib/app_rand.c b/apps/lib/app_rand.c index e38d3a72fc..d3181e56fa 100644 --- a/apps/lib/app_rand.c +++ b/apps/lib/app_rand.c @@ -37,7 +37,7 @@ static int loadfiles(char *name) char *p; int last, ret = 1; - for ( ; ; ) { + for (;;) { last = 0; for (p = name; *p != '\0' && *p != LIST_SEPARATOR_CHAR; p++) continue; diff --git a/apps/lib/apps.c b/apps/lib/apps.c index 6fe99422b9..b15abac857 100644 --- a/apps/lib/apps.c +++ b/apps/lib/apps.c @@ -823,7 +823,7 @@ int load_crls(const char *uri, STACK_OF(X509_CRL) **crls, static const char *format2string(int format) { - switch(format) { + switch (format) { case FORMAT_PEM: return "PEM"; case FORMAT_ASN1: @@ -1942,7 +1942,7 @@ X509_NAME *parse_name(const char *cp, int chtype, int canmulti, ERR_print_errors(bio_err); BIO_printf(bio_err, "%s: Error adding %s name attribute \"/%s=%s\"\n", - opt_getprog(), desc, typestr ,valstr); + opt_getprog(), desc, typestr, valstr); goto err; } } @@ -2845,9 +2845,9 @@ int raw_write_stdout(const void *buf, int siz) # include <floss.h(floss_write)> # endif # endif -int raw_write_stdout(const void *buf,int siz) +int raw_write_stdout(const void *buf, int siz) { - return write(fileno(stdout),(void*)buf,siz); + return write(fileno(stdout), (void*)buf, siz); } #else # if defined(__TANDEM) diff --git a/apps/lib/cmp_mock_srv.c b/apps/lib/cmp_mock_srv.c index 1fb5adca1a..419b74ce6a 100644 --- a/apps/lib/cmp_mock_srv.c +++ b/apps/lib/cmp_mock_srv.c @@ -14,7 +14,7 @@ #include <openssl/cmp.h> #include <openssl/err.h> #include <openssl/cmperr.h> - + /* the context for the CMP mock server */ typedef struct { diff --git a/apps/lib/s_cb.c b/apps/lib/s_cb.c index c9a611aa3a..1d318027d2 100644 --- a/apps/lib/s_cb.c +++ b/apps/lib/s_cb.c @@ -1537,7 +1537,7 @@ void print_ca_names(BIO *bio, SSL *s) return; } - BIO_printf(bio, "---\nAcceptable %s certificate CA names\n",cs); + BIO_printf(bio, "---\nAcceptable %s certificate CA names\n", cs); for (i = 0; i < sk_X509_NAME_num(sk); i++) { X509_NAME_print_ex(bio, sk_X509_NAME_value(sk, i), 0, get_nameopt()); BIO_write(bio, "\n", 1); diff --git a/apps/lib/vms_term_sock.c b/apps/lib/vms_term_sock.c index 1b27699b9d..a1aeb6df06 100644 --- a/apps/lib/vms_term_sock.c +++ b/apps/lib/vms_term_sock.c @@ -120,7 +120,7 @@ typedef struct _SocketPairTimeoutBlock { } SPTB; # ifdef TERM_SOCK_TEST - + /*----------------------------------------------------------------------------*/ /* */ /*----------------------------------------------------------------------------*/ @@ -160,7 +160,7 @@ int main (int argc, char *argv[], char *envp[]) } # endif - + /*----------------------------------------------------------------------------*/ /* */ /*----------------------------------------------------------------------------*/ @@ -275,7 +275,7 @@ int TerminalSocket (int FunctionCode, int *ReturnSocket) return TERM_SOCK_SUCCESS; } - + /*----------------------------------------------------------------------------*/ /* */ /*----------------------------------------------------------------------------*/ @@ -441,7 +441,7 @@ static int CreateSocketPair (int SocketFamily, sin.sin_port = LocalHostPort ; status = connect (SockDesc2, (struct sockaddr *) &sin, sizeof(sin)); - if (status < 0 ) { + if (status < 0) { LogMessage ("CreateSocketPair: connect () - %d", errno); sys$cantim (&sptb, 0); sys$cancel (TcpAcceptChan); @@ -485,7 +485,7 @@ static int CreateSocketPair (int SocketFamily, return (0) ; } - + /*----------------------------------------------------------------------------*/ /* */ /*----------------------------------------------------------------------------*/ @@ -499,7 +499,7 @@ static void SocketPairTimeoutAst (int astparm) return; } - + /*----------------------------------------------------------------------------*/ /* */ /*----------------------------------------------------------------------------*/ @@ -538,7 +538,7 @@ static int TerminalDeviceAst (int astparm) return status; } - + /*----------------------------------------------------------------------------*/ /* */ /*----------------------------------------------------------------------------*/ diff --git a/apps/mac.c b/apps/mac.c index 5f80ca22c7..08f06be867 100644 --- a/apps/mac.c +++ b/apps/mac.c @@ -221,7 +221,7 @@ opthelp: for (i = 0; i < (int)len; ++i) BIO_printf(out, "%02X", buf[i]); if (outfile == NULL) - BIO_printf(out,"\n"); + BIO_printf(out, "\n"); |