open brace '{' following struct go on the same line

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)
This commit is contained in:
Dimitri Papadopoulos 2023-09-13 20:41:58 +02:00 committed by Neil Horman
parent 962431d58b
commit f83707dc6d
13 changed files with 21 additions and 38 deletions

View 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 */

View 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 */

View 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;

View 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 */

View 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;

View File

@ -13,14 +13,12 @@
#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;

View 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;
};

View 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;

View 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 *);

View 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;

View 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[] = {

View 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;

View 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;