Skip to content

Commit

Permalink
style: fix function pointers
Browse files Browse the repository at this point in the history
- fix missing space between return type and opening parenthesis
- fix missing space after * or **
  • Loading branch information
gperciva committed Oct 2, 2023
1 parent 6d91a80 commit 442cf00
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions lib-platform/crypto/crypto_scrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

#include "crypto_scrypt.h"

static void (*smix_func)(uint8_t *, size_t, uint64_t, void *, void *) = NULL;
static void (* smix_func)(uint8_t *, size_t, uint64_t, void *, void *) = NULL;

/**
* crypto_scrypt_internal(passwd, passwdlen, salt, saltlen, N, r, p, buf,
Expand All @@ -56,7 +56,7 @@ static int
crypto_scrypt_internal(const uint8_t * passwd, size_t passwdlen,
const uint8_t * salt, size_t saltlen, uint64_t N, uint32_t _r, uint32_t _p,
uint8_t * buf, size_t buflen,
void (*smix)(uint8_t *, size_t, uint64_t, void *, void *))
void (* smix)(uint8_t *, size_t, uint64_t, void *, void *))
{
void * B0, * V0, * XY0;
uint8_t * B;
Expand Down Expand Up @@ -192,7 +192,7 @@ static struct scrypt_test {
};

static int
testsmix(void (*smix)(uint8_t *, size_t, uint64_t, void *, void *))
testsmix(void (* smix)(uint8_t *, size_t, uint64_t, void *, void *))
{
uint8_t hbuf[TESTLEN];

Expand Down
2 changes: 1 addition & 1 deletion libcperciva/alg/sha256.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ static int
hwtest(const uint32_t state[static restrict 8],
const uint8_t block[static restrict 64],
uint32_t W[static restrict 64], uint32_t S[static restrict 8],
void(* func)(uint32_t state[static restrict 8],
void (* func)(uint32_t state[static restrict 8],
const uint8_t block[static restrict 64], uint32_t W[static restrict 64],
uint32_t S[static restrict 8]))
{
Expand Down
2 changes: 1 addition & 1 deletion libcperciva/crypto/crypto_aes.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static struct aes_test {

/* Test a function against test vectors. */
static int
functest(int(* func)(const uint8_t *, size_t, const uint8_t[16], uint8_t[16]))
functest(int (* func)(const uint8_t *, size_t, const uint8_t[16], uint8_t[16]))
{
struct aes_test * knowngood;
uint8_t ctext[16];
Expand Down

0 comments on commit 442cf00

Please sign in to comment.