Skip to content

Commit

Permalink
"foo * bar" should be "foo *bar"
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos committed Jul 16, 2023
1 parent ba06cd5 commit b83d2fa
Show file tree
Hide file tree
Showing 37 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion apps/dgst.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ static void show_digests(const OBJ_NAME *name, void *arg)
* in the '*sum' checksum programs. This aims to preserve backward
* compatibility.
*/
static const char *newline_escape_filename(const char *file, int * backslash)
static const char *newline_escape_filename(const char *file, int *backslash)
{
size_t i, e = 0, length = strlen(file), newline_count = 0, mem_len = 0;
char *file_cpy = NULL;
Expand Down
6 changes: 3 additions & 3 deletions apps/include/opt.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,11 @@ typedef struct string_int_pair_st {
#define OPT_PARAMETERS() { OPT_PARAM_STR, 1, '-', "Parameters:\n" }

const char *opt_path_end(const char *filename);
char *opt_init(int ac, char **av, const OPTIONS * o);
char *opt_init(int ac, char **av, const OPTIONS *o);
char *opt_progname(const char *argv0);
char *opt_appname(const char *argv0);
char *opt_getprog(void);
void opt_help(const OPTIONS * list);
void opt_help(const OPTIONS *list);

void opt_begin(void);
int opt_next(void);
Expand Down Expand Up @@ -419,7 +419,7 @@ int opt_format(const char *s, unsigned long flags, int *result);
void print_format_error(int format, unsigned long flags);
int opt_printf_stderr(const char *fmt, ...);
int opt_string(const char *name, const char **options);
int opt_pair(const char *arg, const OPT_PAIR * pairs, int *result);
int opt_pair(const char *arg, const OPT_PAIR *pairs, int *result);

int opt_verify(int i, X509_VERIFY_PARAM *vpm);
int opt_rand(int i);
Expand Down
8 changes: 4 additions & 4 deletions apps/lib/apps.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ typedef struct {
} NAME_EX_TBL;

static int set_table_opts(unsigned long *flags, const char *arg,
const NAME_EX_TBL * in_tbl);
const NAME_EX_TBL *in_tbl);
static int set_multi_opts(unsigned long *flags, const char *arg,
const NAME_EX_TBL * in_tbl);
const NAME_EX_TBL *in_tbl);
int app_init(long mesgwin);

int chopup_args(ARGS *arg, char *buf)
Expand Down Expand Up @@ -1273,7 +1273,7 @@ int copy_extensions(X509 *x, X509_REQ *req, int copy_type)
}

static int set_multi_opts(unsigned long *flags, const char *arg,
const NAME_EX_TBL * in_tbl)
const NAME_EX_TBL *in_tbl)
{
STACK_OF(CONF_VALUE) *vals;
CONF_VALUE *val;
Expand All @@ -1292,7 +1292,7 @@ static int set_multi_opts(unsigned long *flags, const char *arg,
}

static int set_table_opts(unsigned long *flags, const char *arg,
const NAME_EX_TBL * in_tbl)
const NAME_EX_TBL *in_tbl)
{
char c;
const NAME_EX_TBL *ptbl;
Expand Down
4 changes: 2 additions & 2 deletions apps/openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,12 +446,12 @@ static int do_cmd(LHASH_OF(FUNCTION) *prog, int argc, char *argv[])
return 1;
}

static int function_cmp(const FUNCTION * a, const FUNCTION * b)
static int function_cmp(const FUNCTION *a, const FUNCTION *b)
{
return strncmp(a->name, b->name, 8);
}

static unsigned long function_hash(const FUNCTION * a)
static unsigned long function_hash(const FUNCTION *a)
{
return OPENSSL_LH_strhash(a->name);
}
Expand Down
4 changes: 2 additions & 2 deletions apps/speed.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ typedef struct loopargs_st {
unsigned char *sig_sig[MAX_KEM_NUM];
} loopargs_t;
static int run_benchmark(int async_jobs, int (*loop_function) (void *),
loopargs_t * loopargs);
loopargs_t *loopargs);

static unsigned int testnum;

Expand Down Expand Up @@ -1302,7 +1302,7 @@ static int SIG_verify_loop(void *args)
}

static int run_benchmark(int async_jobs,
int (*loop_function) (void *), loopargs_t * loopargs)
int (*loop_function) (void *), loopargs_t *loopargs)
{
int job_op_count = 0;
int total_op_count = 0;
Expand Down
2 changes: 1 addition & 1 deletion crypto/conf/conf_def.c
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ static BIO *get_next_file(const char *path, OPENSSL_DIR_CTX **dirctx)

static int is_keytype(const CONF *conf, char c, unsigned short type)
{
const unsigned short * keytypes = (const unsigned short *) conf->meth_data;
const unsigned short *keytypes = (const unsigned short *) conf->meth_data;
unsigned char key = (unsigned char)c;

#ifdef CHARSET_EBCDIC
Expand Down
2 changes: 1 addition & 1 deletion crypto/cpuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ void OPENSSL_cpuid_setup(void)
* There are also assembler versions of this function.
*/
# undef CRYPTO_memcmp
int CRYPTO_memcmp(const void * in_a, const void * in_b, size_t len)
int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len)
{
size_t i;
const volatile unsigned char *a = in_a;
Expand Down
6 changes: 3 additions & 3 deletions crypto/ec/curve448/curve448.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,15 @@ ossl_curve448_point_valid(const curve448_point_t p)
}

static ossl_inline void constant_time_lookup_niels(niels_s * RESTRICT ni,
const niels_t * table,
const niels_t *table,
int nelts, int idx)
{
constant_time_lookup(ni, table, sizeof(niels_s), nelts, idx);
}

void
ossl_curve448_precomputed_scalarmul(curve448_point_t out,
const curve448_precomputed_s * table,
const curve448_precomputed_s *table,
const curve448_scalar_t scalar)
{
unsigned int i, j, k;
Expand Down Expand Up @@ -612,7 +612,7 @@ static int recode_wnaf(struct smvt_control *control,
return n - 1;
}

static void prepare_wnaf_table(pniels_t * output,
static void prepare_wnaf_table(pniels_t *output,
const curve448_point_t working,
unsigned int tbits)
{
Expand Down
2 changes: 1 addition & 1 deletion crypto/ec/curve448/point_448.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ ossl_x448_derive_public_key(uint8_t out[X448_PUBLIC_BYTES],
*/
void
ossl_curve448_precomputed_scalarmul(curve448_point_t scaled,
const curve448_precomputed_s * base,
const curve448_precomputed_s *base,
const curve448_scalar_t scalar);

/*
Expand Down
2 changes: 1 addition & 1 deletion crypto/evp/e_chacha20_poly1305.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ static int chacha_init_key(EVP_CIPHER_CTX *ctx,
return 1;
}

static int chacha_cipher(EVP_CIPHER_CTX * ctx, unsigned char *out,
static int chacha_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *inp, size_t len)
{
EVP_CHACHA_KEY *key = data(ctx);
Expand Down
2 changes: 1 addition & 1 deletion crypto/pem/pem_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ int PEM_read_bio_ex(BIO *bp, char **name_out, char **header,
BIO *headerB = NULL, *dataB = NULL;
char *name = NULL;
int len, taillen, headerlen, ret = 0;
BUF_MEM * buf_mem;
BUF_MEM *buf_mem;

*len_out = 0;
*name_out = *header = NULL;
Expand Down
2 changes: 1 addition & 1 deletion crypto/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ BIO *OSSL_trace_begin(int category)
return channel;
}

void OSSL_trace_end(int category, BIO * channel)
void OSSL_trace_end(int category, BIO *channel)
{
#ifndef OPENSSL_NO_TRACE
char *suffix = NULL;
Expand Down
4 changes: 2 additions & 2 deletions crypto/x509/v3_admis.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const X509V3_EXT_METHOD ossl_v3_ext_admission = {
static int i2r_NAMING_AUTHORITY(const struct v3_ext_method *method, void *in,
BIO *bp, int ind)
{
NAMING_AUTHORITY * namingAuthority = (NAMING_AUTHORITY*) in;
NAMING_AUTHORITY *namingAuthority = (NAMING_AUTHORITY*) in;

if (namingAuthority == NULL)
return 0;
Expand Down Expand Up @@ -118,7 +118,7 @@ static int i2r_NAMING_AUTHORITY(const struct v3_ext_method *method, void *in,
static int i2r_ADMISSION_SYNTAX(const struct v3_ext_method *method, void *in,
BIO *bp, int ind)
{
ADMISSION_SYNTAX * admission = (ADMISSION_SYNTAX *)in;
ADMISSION_SYNTAX *admission = (ADMISSION_SYNTAX *)in;
int i, j, k;

if (admission->admissionAuthority != NULL) {
Expand Down
2 changes: 1 addition & 1 deletion demos/digest/BIO_f_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* The default digest is SHA3-512
*/

int main(int argc, char * argv[])
int main(int argc, char *argv[])
{
int ret = EXIT_FAILURE;
OSSL_LIB_CTX *library_context = NULL;
Expand Down
4 changes: 2 additions & 2 deletions demos/digest/EVP_MD_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* more than once.
*/

const char * hamlet_1 =
const char *hamlet_1 =
"To be, or not to be, that is the question,\n"
"Whether tis nobler in the minde to suffer\n"
"The ſlings and arrowes of outragious fortune,\n"
Expand All @@ -43,7 +43,7 @@ const char * hamlet_1 =
"The oppressor's wrong, the proud man's Contumely,\n"
"The pangs of dispised love, the Law's delay,\n"
;
const char * hamlet_2 =
const char *hamlet_2 =
"The insolence of Office, and the spurns\n"
"That patient merit of the'unworthy takes,\n"
"When he himself might his Quietas make\n"
Expand Down
2 changes: 1 addition & 1 deletion demos/digest/EVP_MD_stdin.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int demonstrate_digest(BIO *input)
{
OSSL_LIB_CTX *library_context = NULL;
int ret = 0;
const char * option_properties = NULL;
const char *option_properties = NULL;
EVP_MD *message_digest = NULL;
EVP_MD_CTX *digest_context = NULL;
unsigned int digest_length;
Expand Down
2 changes: 1 addition & 1 deletion engines/e_dasync.c
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ static void dummy_pause_job(void) {
ASYNC_JOB *job;
ASYNC_WAIT_CTX *waitctx;
ASYNC_callback_fn callback;
void * callback_arg;
void *callback_arg;
OSSL_ASYNC_FD pipefds[2] = {0, 0};
OSSL_ASYNC_FD *writefd;
#if defined(ASYNC_WIN)
Expand Down
24 changes: 12 additions & 12 deletions include/crypto/aes_platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,29 +121,29 @@ void gcm_ghash_p8(u64 Xi[2],const u128 Htable[16],const u8 *inp, size_t len);
(gctx)->gcm.funcs.ghash==gcm_ghash_v8)
/* The [unroll8_eor3_]aes_gcm_(enc|dec)_(128|192|256)_kernel() functions
* take input length in BITS and return number of BYTES processed */
size_t aes_gcm_enc_128_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext,
size_t aes_gcm_enc_128_kernel(const uint8_t *plaintext, uint64_t plaintext_length, uint8_t *ciphertext,
uint64_t *Xi, unsigned char ivec[16], const void *key);
size_t aes_gcm_enc_192_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext,
size_t aes_gcm_enc_192_kernel(const uint8_t *plaintext, uint64_t plaintext_length, uint8_t *ciphertext,
uint64_t *Xi, unsigned char ivec[16], const void *key);
size_t aes_gcm_enc_256_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext,
size_t aes_gcm_enc_256_kernel(const uint8_t *plaintext, uint64_t plaintext_length, uint8_t *ciphertext,
uint64_t *Xi, unsigned char ivec[16], const void *key);
size_t aes_gcm_dec_128_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plaintext,
size_t aes_gcm_dec_128_kernel(const uint8_t *ciphertext, uint64_t plaintext_length, uint8_t *plaintext,
uint64_t *Xi, unsigned char ivec[16], const void *key);
size_t aes_gcm_dec_192_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plaintext,
size_t aes_gcm_dec_192_kernel(const uint8_t *ciphertext, uint64_t plaintext_length, uint8_t *plaintext,
uint64_t *Xi, unsigned char ivec[16], const void *key);
size_t aes_gcm_dec_256_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plaintext,
size_t aes_gcm_dec_256_kernel(const uint8_t *ciphertext, uint64_t plaintext_length, uint8_t *plaintext,
uint64_t *Xi, unsigned char ivec[16], const void *key);
size_t unroll8_eor3_aes_gcm_enc_128_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext,
size_t unroll8_eor3_aes_gcm_enc_128_kernel(const uint8_t *plaintext, uint64_t plaintext_length, uint8_t *ciphertext,
uint64_t *Xi, unsigned char ivec[16], const void *key);
size_t unroll8_eor3_aes_gcm_enc_192_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext,
size_t unroll8_eor3_aes_gcm_enc_192_kernel(const uint8_t *plaintext, uint64_t plaintext_length, uint8_t *ciphertext,
uint64_t *Xi, unsigned char ivec[16], const void *key);
size_t unroll8_eor3_aes_gcm_enc_256_kernel(const uint8_t * plaintext, uint64_t plaintext_length, uint8_t * ciphertext,
size_t unroll8_eor3_aes_gcm_enc_256_kernel(const uint8_t *plaintext, uint64_t plaintext_length, uint8_t *ciphertext,
uint64_t *Xi, unsigned char ivec[16], const void *key);
size_t unroll8_eor3_aes_gcm_dec_128_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plaintext,
size_t unroll8_eor3_aes_gcm_dec_128_kernel(const uint8_t *ciphertext, uint64_t plaintext_length, uint8_t *plaintext,
uint64_t *Xi, unsigned char ivec[16], const void *key);
size_t unroll8_eor3_aes_gcm_dec_192_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plaintext,
size_t unroll8_eor3_aes_gcm_dec_192_kernel(const uint8_t *ciphertext, uint64_t plaintext_length, uint8_t *plaintext,
uint64_t *Xi, unsigned char ivec[16], const void *key);
size_t unroll8_eor3_aes_gcm_dec_256_kernel(const uint8_t * ciphertext, uint64_t plaintext_length, uint8_t * plaintext,
size_t unroll8_eor3_aes_gcm_dec_256_kernel(const uint8_t *ciphertext, uint64_t plaintext_length, uint8_t *plaintext,
uint64_t *Xi, unsigned char ivec[16], const void *key);
size_t armv8_aes_gcm_encrypt(const unsigned char *in, unsigned char *out, size_t len, const void *key,
unsigned char ivec[16], u64 *Xi);
Expand Down
6 changes: 3 additions & 3 deletions include/crypto/asn1.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,9 @@ X509_ALGOR *ossl_x509_algor_mgf1_decode(X509_ALGOR *alg);
int ossl_x509_algor_md_to_mgf1(X509_ALGOR **palg, const EVP_MD *mgf1md);
int ossl_asn1_time_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags);

EVP_PKEY * ossl_d2i_PrivateKey_legacy(int keytype, EVP_PKEY **a,
const unsigned char **pp, long length,
OSSL_LIB_CTX *libctx, const char *propq);
EVP_PKEY *ossl_d2i_PrivateKey_legacy(int keytype, EVP_PKEY **a,
const unsigned char **pp, long length,
OSSL_LIB_CTX *libctx, const char *propq);
X509_ALGOR *ossl_X509_ALGOR_from_nid(int nid, int ptype, void *pval);

time_t ossl_asn1_string_to_time_t(const char *asn1_string);
Expand Down
2 changes: 1 addition & 1 deletion providers/implementations/ciphers/cipher_aes_gcm_siv.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ static int ossl_##alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[])
return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
flags, kbits, blkbits, ivbits); \
} \
static void * ossl_##alg##kbits##_##lc##_newctx(void *provctx) \
static void *ossl_##alg##kbits##_##lc##_newctx(void *provctx) \
{ \
return ossl_##alg##_##lc##_newctx(provctx, kbits); \
} \
Expand Down
2 changes: 1 addition & 1 deletion providers/implementations/ciphers/cipher_aes_siv.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ static int alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[]) \
return ossl_cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
flags, 2*kbits, blkbits, ivbits); \
} \
static void * alg##kbits##lc##_newctx(void *provctx) \
static void *alg##kbits##lc##_newctx(void *provctx) \
{ \
return alg##_##lc##_newctx(provctx, 2*kbits, EVP_CIPH_##UCMODE##_MODE, \
flags); \
Expand Down
2 changes: 1 addition & 1 deletion providers/implementations/ciphers/cipher_rc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static int alg##_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \
flags, kbits, blkbits, ivbits); \
} \
static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \
static void * alg##_##kbits##_##lcmode##_newctx(void *provctx) \
static void *alg##_##kbits##_##lcmode##_newctx(void *provctx) \
{ \
PROV_##UCALG##_CTX *ctx; \
if (!ossl_prov_is_running()) \
Expand Down
2 changes: 1 addition & 1 deletion providers/implementations/ciphers/cipher_rc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static int alg##_##kbits##_get_params(OSSL_PARAM params[]) \
kbits, blkbits, ivbits); \
} \
static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_newctx; \
static void * alg##_##kbits##_newctx(void *provctx) \
static void *alg##_##kbits##_newctx(void *provctx) \
{ \
PROV_##UCALG##_CTX *ctx; \
if (!ossl_prov_is_running()) \
Expand Down
2 changes: 1 addition & 1 deletion providers/implementations/ciphers/cipher_rc5.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static int alg##_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \
flags, kbits, blkbits, ivbits); \
} \
static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \
static void * alg##_##kbits##_##lcmode##_newctx(void *provctx) \
static void *alg##_##kbits##_##lcmode##_newctx(void *provctx) \
{ \
PROV_##UCALG##_CTX *ctx; \
if (!ossl_prov_is_running()) \
Expand Down
6 changes: 3 additions & 3 deletions providers/implementations/rands/seeding/rand_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ static int wait_random_seeded(void)
* So the handle might have been closed or even reused for opening
* another file.
*/
static int check_random_device(struct random_device * rd)
static int check_random_device(struct random_device *rd)
{
struct stat st;

Expand All @@ -528,7 +528,7 @@ static int check_random_device(struct random_device * rd)
static int get_random_device(size_t n)
{
struct stat st;
struct random_device * rd = &random_devices[n];
struct random_device *rd = &random_devices[n];

/* reuse existing file descriptor if it is (still) valid */
if (check_random_device(rd))
Expand Down Expand Up @@ -557,7 +557,7 @@ static int get_random_device(size_t n)
*/
static void close_random_device(size_t n)
{
struct random_device * rd = &random_devices[n];
struct random_device *rd = &random_devices[n];

if (check_random_device(rd))
close(rd->fd);
Expand Down
2 changes: 1 addition & 1 deletion ssl/d1_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ long dtls1_ctrl(SSL *ssl, int cmd, long larg, void *parg)
return ret;
}

static void dtls1_bio_set_next_timeout(BIO * bio, const DTLS1_STATE *d1)
static void dtls1_bio_set_next_timeout(BIO *bio, const DTLS1_STATE *d1)
{
struct timeval tv = ossl_time_to_timeval(d1->next_timeout);

Expand Down
2 changes: 1 addition & 1 deletion ssl/ssl_ciph.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static const ssl_cipher_table ssl_cipher_table_auth[] = {
/* *INDENT-ON* */

/* Utility function for table lookup */
static int ssl_cipher_info_find(const ssl_cipher_table * table,
static int ssl_cipher_info_find(const ssl_cipher_table *table,
size_t table_cnt, uint32_t mask)
{
size_t i;
Expand Down

0 comments on commit b83d2fa

Please sign in to comment.