]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
open brace '{' following struct go on the same line
authorDimitri Papadopoulos <3234522+DimitriPapadopoulos@users.noreply.github.com>
Wed, 13 Sep 2023 18:41:58 +0000 (20:41 +0200)
committerNeil Horman <nhorman@openssl.org>
Mon, 22 Jul 2024 10:55:35 +0000 (06:55 -0400)
Found by running the checkpatch.pl Linux script to enforce coding style.

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22097)

13 files changed:
apps/lib/cmp_mock_srv.c
crypto/cmp/cmp_server.c
crypto/evp/p_lib.c
crypto/hpke/hpke.c
crypto/mem_sec.c
crypto/self_test_core.c
engines/e_afalg.c
include/internal/sha3.h
ssl/priority_queue.c
ssl/record/methods/recmethod_local.h
test/bntest.c
test/hexstr_test.c
test/hpke_test.c

index ce62af2b007aa4e44d4fe24afa7cfa49262726bf..d98d4598a9750c8161f1c4f5bb9e129fdaf77409 100644 (file)
@@ -16,8 +16,7 @@
 #include <openssl/cmperr.h>
 
 /* the context for the CMP mock server */
-typedef struct
-{
+typedef struct {
     X509 *refCert;             /* cert to expect for oldCertID in kur/rr msg */
     X509 *certOut;             /* certificate to be returned in cp/ip/kup msg */
     X509_CRL *crlOut;          /* CRL to be returned in genp for crls */
index 53c41bc96eeb820549eec80ce4e6b661c2c665d9..84bddcec0907addb9f11959e056a34cd2fa54c6d 100644 (file)
@@ -20,8 +20,7 @@
 #include <openssl/err.h>
 
 /* the context for the generic CMP server */
-struct ossl_cmp_srv_ctx_st
-{
+struct ossl_cmp_srv_ctx_st {
     OSSL_CMP_CTX *ctx; /* CMP client context reused for transactionID etc. */
     void *custom_ctx;  /* application-specific server context */
     int certReqId;     /* of ir/cr/kur, OSSL_CMP_CERTREQID_NONE for p10cr */
index b7377751bd483518d83c3580004396ce2e6a4c74..09bd185a25b60bc05798674d7bd316202e4e5db1 100644 (file)
@@ -525,8 +525,7 @@ EVP_PKEY *EVP_PKEY_new_raw_public_key(int type, ENGINE *e,
     return new_raw_key_int(NULL, NULL, NULL, type, e, pub, len, 0);
 }
 
-struct raw_key_details_st
-{
+struct raw_key_details_st {
     unsigned char **key;
     size_t *len;
     int selection;
index a53488d9ec4085425f7e882e8c8a89db79cf18d2..5a403097c4169f90f280ff4f863fb5e715afd2c3 100644 (file)
@@ -45,8 +45,7 @@ static const char OSSL_HPKE_SECRET_LABEL[] = "\x73\x65\x63\x72\x65\x74";
 /**
  * @brief sender or receiver context
  */
-struct ossl_hpke_ctx_st
-{
+struct ossl_hpke_ctx_st {
     OSSL_LIB_CTX *libctx; /* library context */
     char *propq; /* properties */
     int mode; /* HPKE mode */
index 269c7dcb6d41790cae83de792c446800ea65d5c6..f411522fab1b04abe42e29d3425f8632f9a50c3f 100644 (file)
@@ -321,14 +321,12 @@ size_t CRYPTO_secure_actual_size(void *ptr)
     ((char*)(p) >= (char*)sh.freelist && (char*)(p) < (char*)&sh.freelist[sh.freelist_size])
 
 
-typedef struct sh_list_st
-{
+typedef struct sh_list_st {
     struct sh_list_st *next;
     struct sh_list_st **p_next;
 } SH_LIST;
 
-typedef struct sh_st
-{
+typedef struct sh_st {
     char* map_result;
     size_t map_size;
     char *arena;
index f31fce57c81564af6986ed3e7472ca2127d250b8..0d31b4d78f2535160f7701d95ba10e19cf5c0c4d 100644 (file)
 #include "internal/cryptlib.h"
 #include "crypto/context.h"
 
-typedef struct self_test_cb_st
-{
+typedef struct self_test_cb_st {
     OSSL_CALLBACK *cb;
     void *cbarg;
 } SELF_TEST_CB;
 
-struct ossl_self_test_st
-{
+struct ossl_self_test_st {
     /* local state variables */
     const char *phase;
     const char *type;
index 3ca5b0211e7b6c703bcd733aee08618a9dd808a3..3644524e9fc8bf2105c13167b153acec9e16a575 100644 (file)
@@ -125,8 +125,7 @@ static ossl_inline int io_read(aio_context_t ctx, long n, struct iocb **iocb)
 }
 
 /* A version of 'struct timespec' with 32-bit time_t and nanoseconds.  */
-struct __timespec32
-{
+struct __timespec32 {
   __kernel_long_t tv_sec;
   __kernel_long_t tv_nsec;
 };
index 77bd9dbd32da454b162b46518162b6da23cc5730..6bd53f6d2ae790eae0736edd6ad72fa86a209a06 100644 (file)
@@ -26,8 +26,7 @@ typedef size_t (sha3_absorb_fn)(void *vctx, const void *in, size_t inlen);
 typedef int (sha3_final_fn)(void *vctx, unsigned char *out, size_t outlen);
 typedef int (sha3_squeeze_fn)(void *vctx, unsigned char *out, size_t outlen);
 
-typedef struct prov_sha3_meth_st
-{
+typedef struct prov_sha3_meth_st {
     sha3_absorb_fn *absorb;
     sha3_final_fn *final;
     sha3_squeeze_fn *squeeze;
index 5393c532a7addb6d85014015a48e4c170af8ae9c..6862fb603a61c5af0cda2148a86d7d8d301886c8 100644 (file)
@@ -46,8 +46,7 @@ struct pq_elem_st {
 #endif
 };
 
-struct ossl_pqueue_st
-{
+struct ossl_pqueue_st {
     struct pq_heap_st *heap;
     struct pq_elem_st *elements;
     int (*compare)(const void *, const void *);
index e08737eb76f992b3d48a9d74de119c18b85cecfa..364a3a01bbe2006e70dd2ff7edabf6b173e112f0 100644 (file)
@@ -91,8 +91,7 @@ typedef struct tls_rl_record_st {
 
 
 /* Protocol version specific function pointers */
-struct record_functions_st
-{
+struct record_functions_st {
     /*
      * Returns either OSSL_RECORD_RETURN_SUCCESS, OSSL_RECORD_RETURN_FATAL or
      * OSSL_RECORD_RETURN_NON_FATAL_ERR if we can keep trying to find an
@@ -209,8 +208,7 @@ struct record_functions_st
     int (*prepare_write_bio)(OSSL_RECORD_LAYER *rl, int type);
 };
 
-struct ossl_record_layer_st
-{
+struct ossl_record_layer_st {
     OSSL_LIB_CTX *libctx;
     const char *propq;
     int isdtls;
index 20020cac42feea60972e466f8b71f56a16734d08..8c682038664b22afe34af3c4763344ca8c9847aa 100644 (file)
@@ -2847,12 +2847,11 @@ static int test_gcd_prime(void)
     return st;
 }
 
-typedef struct mod_exp_test_st
-{
-  const char *base;
-  const char *exp;
-  const char *mod;
-  const char *res;
+typedef struct mod_exp_test_st {
+    const char *base;
+    const char *exp;
+    const char *mod;
+    const char *res;
 } MOD_EXP_TEST;
 
 static const MOD_EXP_TEST ModExpTests[] = {
index 89d6d9713978ceebf5f2d22bff7b0d481558b319..f2581d2ba8994b9a494022b7ddaeae8f84034a30 100644 (file)
@@ -16,8 +16,7 @@
 #include "internal/cryptlib.h"
 #include "testutil.h"
 
-struct testdata
-{
+struct testdata {
     const char *in;
     const unsigned char *expected;
     size_t expected_len;
index a8bd1f8f643860bf55ca03d40d5e99461587fdd1..7ce51a6f32937f0164a6dca9901140adc5a5905d 100644 (file)
@@ -46,8 +46,7 @@ typedef struct {
     const char *pskid; /* want terminating NUL here */
 } TEST_BASEDATA;
 
-typedef struct
-{
+typedef struct {
     int seq;
     const unsigned char *pt;
     size_t ptlen;
@@ -57,8 +56,7 @@ typedef struct
     size_t expected_ctlen;
 } TEST_AEADDATA;
 
-typedef struct
-{
+typedef struct {
     const unsigned char *context;
     size_t contextlen;
     const unsigned char *expected_secret;