From 70170c28c844a4786e75efc626e1aeebc93caebc Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Mon, 13 Mar 2017 09:22:21 +0100 Subject: [PATCH] Indent --- .../box_curve25519xchacha20poly1305.c | 10 +++++----- .../box_curve25519xsalsa20poly1305.c | 14 +++++++------- .../blake2b/ref/generichash_blake2b.c | 4 ++-- .../poly1305/donna/poly1305_donna.c | 2 +- .../poly1305/onetimeauth_poly1305.c | 8 ++++---- .../poly1305/sse2/poly1305_sse2.c | 6 +++--- .../crypto_pwhash/argon2/argon2-encoding.c | 4 ++-- .../crypto_pwhash/argon2/argon2-fill-block-ref.c | 2 +- .../crypto_pwhash/argon2/argon2-fill-block-ssse3.c | 2 +- src/libsodium/crypto_pwhash/argon2/argon2.c | 4 ++-- src/libsodium/crypto_pwhash/argon2/blake2b-long.c | 4 ++-- .../scryptsalsa208sha256/crypto_scrypt-common.c | 2 +- .../nosse/pwhash_scryptsalsa208sha256_nosse.c | 6 +++--- src/libsodium/crypto_sign/ed25519/ref10/keypair.c | 4 ++-- src/libsodium/crypto_sign/ed25519/ref10/obsolete.c | 8 ++++---- .../aes128ctr/nacl/afternm_aes128ctr.c | 4 ++-- .../aes128ctr/nacl/int128_aes128ctr.c | 6 +++--- .../aes128ctr/nacl/xor_afternm_aes128ctr.c | 4 ++-- .../crypto_stream/chacha20/ref/chacha20_ref.c | 2 +- 19 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c b/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c index 1ccf8076c4..1a4d26be0d 100644 --- a/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c +++ b/src/libsodium/crypto_box/curve25519xchacha20poly1305/box_curve25519xchacha20poly1305.c @@ -14,8 +14,8 @@ #include "utils.h" int -crypto_box_curve25519xchacha20poly1305_seed_keypair(unsigned char * pk, - unsigned char * sk, +crypto_box_curve25519xchacha20poly1305_seed_keypair(unsigned char *pk, + unsigned char *sk, const unsigned char *seed) { unsigned char hash[64]; @@ -37,7 +37,7 @@ crypto_box_curve25519xchacha20poly1305_keypair(unsigned char *pk, } int -crypto_box_curve25519xchacha20poly1305_beforenm(unsigned char * k, +crypto_box_curve25519xchacha20poly1305_beforenm(unsigned char *k, const unsigned char *pk, const unsigned char *sk) { @@ -80,9 +80,9 @@ crypto_box_curve25519xchacha20poly1305_detached( } int -crypto_box_curve25519xchacha20poly1305_easy_afternm(unsigned char * c, +crypto_box_curve25519xchacha20poly1305_easy_afternm(unsigned char *c, const unsigned char *m, - unsigned long long mlen, + unsigned long long mlen, const unsigned char *n, const unsigned char *k) { diff --git a/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c b/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c index eac9dce093..7d6d603aae 100644 --- a/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c +++ b/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c @@ -9,8 +9,8 @@ #include "utils.h" int -crypto_box_curve25519xsalsa20poly1305_seed_keypair(unsigned char * pk, - unsigned char * sk, +crypto_box_curve25519xsalsa20poly1305_seed_keypair(unsigned char *pk, + unsigned char *sk, const unsigned char *seed) { unsigned char hash[64]; @@ -32,7 +32,7 @@ crypto_box_curve25519xsalsa20poly1305_keypair(unsigned char *pk, } int -crypto_box_curve25519xsalsa20poly1305_beforenm(unsigned char * k, +crypto_box_curve25519xsalsa20poly1305_beforenm(unsigned char *k, const unsigned char *pk, const unsigned char *sk) { @@ -46,9 +46,9 @@ crypto_box_curve25519xsalsa20poly1305_beforenm(unsigned char * k, } int -crypto_box_curve25519xsalsa20poly1305_afternm(unsigned char * c, +crypto_box_curve25519xsalsa20poly1305_afternm(unsigned char *c, const unsigned char *m, - unsigned long long mlen, + unsigned long long mlen, const unsigned char *n, const unsigned char *k) { @@ -56,9 +56,9 @@ crypto_box_curve25519xsalsa20poly1305_afternm(unsigned char * c, } int -crypto_box_curve25519xsalsa20poly1305_open_afternm(unsigned char * m, +crypto_box_curve25519xsalsa20poly1305_open_afternm(unsigned char *m, const unsigned char *c, - unsigned long long clen, + unsigned long long clen, const unsigned char *n, const unsigned char *k) { diff --git a/src/libsodium/crypto_generichash/blake2b/ref/generichash_blake2b.c b/src/libsodium/crypto_generichash/blake2b/ref/generichash_blake2b.c index 3a5e716ab8..474d26ebbc 100644 --- a/src/libsodium/crypto_generichash/blake2b/ref/generichash_blake2b.c +++ b/src/libsodium/crypto_generichash/blake2b/ref/generichash_blake2b.c @@ -89,8 +89,8 @@ crypto_generichash_blake2b_init_salt_personal( int crypto_generichash_blake2b_update(crypto_generichash_blake2b_state *state, - const unsigned char * in, - unsigned long long inlen) + const unsigned char *in, + unsigned long long inlen) { return blake2b_update(state, (const uint8_t *) in, (uint64_t) inlen); } diff --git a/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c b/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c index a71e302046..e798072f84 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c +++ b/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c @@ -71,7 +71,7 @@ crypto_onetimeauth_poly1305_donna(unsigned char *out, const unsigned char *m, static int crypto_onetimeauth_poly1305_donna_init(crypto_onetimeauth_poly1305_state *state, - const unsigned char * key) + const unsigned char *key) { COMPILER_ASSERT(sizeof(crypto_onetimeauth_poly1305_state) >= sizeof(poly1305_state_internal_t)); diff --git a/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c b/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c index 28db5663de..a8a515db63 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c +++ b/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c @@ -31,22 +31,22 @@ crypto_onetimeauth_poly1305_verify(const unsigned char *h, int crypto_onetimeauth_poly1305_init(crypto_onetimeauth_poly1305_state *state, - const unsigned char * key) + const unsigned char *key) { return implementation->onetimeauth_init(state, key); } int crypto_onetimeauth_poly1305_update(crypto_onetimeauth_poly1305_state *state, - const unsigned char * in, - unsigned long long inlen) + const unsigned char *in, + unsigned long long inlen) { return implementation->onetimeauth_update(state, in, inlen); } int crypto_onetimeauth_poly1305_final(crypto_onetimeauth_poly1305_state *state, - unsigned char * out) + unsigned char *out) { return implementation->onetimeauth_final(state, out); } diff --git a/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c b/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c index f39242de54..aff802de57 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c +++ b/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c @@ -109,7 +109,7 @@ static POLY1305_NOINLINE void poly1305_init_ext(poly1305_state_internal_t *st, const unsigned char key[32], unsigned long long bytes) { - uint32_t * R; + uint32_t *R; uint128_t d[3]; uint64_t r0, r1, r2; uint64_t rt0, rt1, rt2, st2, c; @@ -880,7 +880,7 @@ poly1305_finish(poly1305_state_internal_t *st, unsigned char mac[16]) static int crypto_onetimeauth_poly1305_sse2_init(crypto_onetimeauth_poly1305_state *state, - const unsigned char * key) + const unsigned char *key) { COMPILER_ASSERT(sizeof(crypto_onetimeauth_poly1305_state) >= sizeof(poly1305_state_internal_t)); @@ -901,7 +901,7 @@ crypto_onetimeauth_poly1305_sse2_update( static int crypto_onetimeauth_poly1305_sse2_final(crypto_onetimeauth_poly1305_state *state, - unsigned char * out) + unsigned char *out) { poly1305_finish((poly1305_state_internal_t *) (void *) state, out); diff --git a/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c b/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c index 9806722282..264bddd8e9 100644 --- a/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c +++ b/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c @@ -200,8 +200,8 @@ from_base64(void *dst, size_t *dst_len, const char *src) static const char * decode_decimal(const char *str, unsigned long *v) { - const char * orig; - unsigned long acc; + const char *orig; + unsigned long acc; acc = 0; for (orig = str;; str++) { diff --git a/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c b/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c index dcee410bc8..1839277881 100644 --- a/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c +++ b/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c @@ -143,7 +143,7 @@ generate_addresses(const argon2_instance_t *instance, int fill_segment_ref(const argon2_instance_t *instance, argon2_position_t position) { - block * ref_block = NULL, *curr_block = NULL; + block *ref_block = NULL, *curr_block = NULL; uint64_t pseudo_rand, ref_index, ref_lane; uint32_t prev_offset, curr_offset; uint32_t starting_index; diff --git a/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c b/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c index c9098f7149..6f276050db 100644 --- a/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c +++ b/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c @@ -142,7 +142,7 @@ int fill_segment_ssse3(const argon2_instance_t *instance, argon2_position_t position) { - block * ref_block = NULL, *curr_block = NULL; + block *ref_block = NULL, *curr_block = NULL; uint64_t pseudo_rand, ref_index, ref_lane; uint32_t prev_offset, curr_offset; uint32_t starting_index, i; diff --git a/src/libsodium/crypto_pwhash/argon2/argon2.c b/src/libsodium/crypto_pwhash/argon2/argon2.c index b1e6513f36..f10b57b04e 100644 --- a/src/libsodium/crypto_pwhash/argon2/argon2.c +++ b/src/libsodium/crypto_pwhash/argon2/argon2.c @@ -91,7 +91,7 @@ argon2_hash(const uint32_t t_cost, const uint32_t m_cost, { argon2_context context; int result; - uint8_t * out; + uint8_t *out; if (pwdlen > ARGON2_MAX_PWD_LENGTH) { return ARGON2_PWD_TOO_LONG; @@ -181,7 +181,7 @@ argon2_verify(const char *encoded, const void *pwd, const size_t pwdlen, argon2_type type) { argon2_context ctx; - uint8_t * out; + uint8_t *out; int decode_result; int ret; size_t encoded_len; diff --git a/src/libsodium/crypto_pwhash/argon2/blake2b-long.c b/src/libsodium/crypto_pwhash/argon2/blake2b-long.c index 1ac1541c10..f0364aca87 100644 --- a/src/libsodium/crypto_pwhash/argon2/blake2b-long.c +++ b/src/libsodium/crypto_pwhash/argon2/blake2b-long.c @@ -12,10 +12,10 @@ int blake2b_long(void *pout, size_t outlen, const void *in, size_t inlen) { - uint8_t * out = (uint8_t *) pout; + uint8_t *out = (uint8_t *) pout; crypto_generichash_blake2b_state blake_state; uint8_t outlen_bytes[4 /* sizeof(uint32_t) */] = { 0 }; - int ret = -1; + int ret = -1; if (outlen > UINT32_MAX) { goto fail; /* LCOV_EXCL_LINE */ diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c index 89a5bc833c..a8f90add05 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/crypto_scrypt-common.c @@ -113,7 +113,7 @@ escrypt_r(escrypt_local_t *local, const uint8_t *passwd, size_t passwdlen, escrypt_kdf_t escrypt_kdf; const uint8_t *src; const uint8_t *salt; - uint8_t * dst; + uint8_t *dst; size_t prefixlen; size_t saltlen; size_t need; diff --git a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c index bdb41b6e05..36e5a80ac5 100644 --- a/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c +++ b/src/libsodium/crypto_pwhash/scryptsalsa208sha256/nosse/pwhash_scryptsalsa208sha256_nosse.c @@ -113,9 +113,9 @@ blkxor(escrypt_block_t *dest, const escrypt_block_t *src, size_t len) static void salsa20_8(uint32_t B[16]) { - escrypt_block_t X; - uint32_t * x = X.w; - size_t i; + escrypt_block_t X; + uint32_t *x = X.w; + size_t i; blkcpy_64(&X, (escrypt_block_t *) B); for (i = 0; i < 8; i += 2) { diff --git a/src/libsodium/crypto_sign/ed25519/ref10/keypair.c b/src/libsodium/crypto_sign/ed25519/ref10/keypair.c index 1665900e43..8a7b444c41 100644 --- a/src/libsodium/crypto_sign/ed25519/ref10/keypair.c +++ b/src/libsodium/crypto_sign/ed25519/ref10/keypair.c @@ -42,7 +42,7 @@ crypto_sign_ed25519_keypair(unsigned char *pk, unsigned char *sk) } int -crypto_sign_ed25519_pk_to_curve25519(unsigned char * curve25519_pk, +crypto_sign_ed25519_pk_to_curve25519(unsigned char *curve25519_pk, const unsigned char *ed25519_pk) { ge_p3 A; @@ -64,7 +64,7 @@ crypto_sign_ed25519_pk_to_curve25519(unsigned char * curve25519_pk, } int -crypto_sign_ed25519_sk_to_curve25519(unsigned char * curve25519_sk, +crypto_sign_ed25519_sk_to_curve25519(unsigned char *curve25519_sk, const unsigned char *ed25519_sk) { unsigned char h[crypto_hash_sha512_BYTES]; diff --git a/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c b/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c index 5ba31babf4..c572ff117a 100644 --- a/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c +++ b/src/libsodium/crypto_sign/ed25519/ref10/obsolete.c @@ -28,8 +28,8 @@ crypto_sign_edwards25519sha512batch_keypair(unsigned char *pk, } int -crypto_sign_edwards25519sha512batch(unsigned char * sm, - unsigned long long * smlen_p, +crypto_sign_edwards25519sha512batch(unsigned char *sm, + unsigned long long *smlen_p, const unsigned char *m, unsigned long long mlen, const unsigned char *sk) @@ -66,8 +66,8 @@ crypto_sign_edwards25519sha512batch(unsigned char * sm, } int -crypto_sign_edwards25519sha512batch_open(unsigned char * m, - unsigned long long * mlen_p, +crypto_sign_edwards25519sha512batch_open(unsigned char *m, + unsigned long long *mlen_p, const unsigned char *sm, unsigned long long smlen, const unsigned char *pk) diff --git a/src/libsodium/crypto_stream/aes128ctr/nacl/afternm_aes128ctr.c b/src/libsodium/crypto_stream/aes128ctr/nacl/afternm_aes128ctr.c index 1691003933..1cb21c15d5 100644 --- a/src/libsodium/crypto_stream/aes128ctr/nacl/afternm_aes128ctr.c +++ b/src/libsodium/crypto_stream/aes128ctr/nacl/afternm_aes128ctr.c @@ -32,8 +32,8 @@ crypto_stream_aes128ctr_afternm(unsigned char *out, unsigned long long len, aes_uint128_t nonce_stack; unsigned long long lensav; unsigned char bl[128]; - unsigned char * blp; - unsigned char * np; + unsigned char *blp; + unsigned char *np; unsigned char b; uint32_t tmp; diff --git a/src/libsodium/crypto_stream/aes128ctr/nacl/int128_aes128ctr.c b/src/libsodium/crypto_stream/aes128ctr/nacl/int128_aes128ctr.c index b74eef2da2..5824eb794c 100644 --- a/src/libsodium/crypto_stream/aes128ctr/nacl/int128_aes128ctr.c +++ b/src/libsodium/crypto_stream/aes128ctr/nacl/int128_aes128ctr.c @@ -34,9 +34,9 @@ copy2(aes_uint128_t *r, const aes_uint128_t *x) void shufb(aes_uint128_t *r, const unsigned char *l) { - aes_uint128_t t; - uint8_t * ct; - uint8_t * cr; + aes_uint128_t t; + uint8_t *ct; + uint8_t *cr; copy2(&t, r); cr = r->u8; diff --git a/src/libsodium/crypto_stream/aes128ctr/nacl/xor_afternm_aes128ctr.c b/src/libsodium/crypto_stream/aes128ctr/nacl/xor_afternm_aes128ctr.c index 07396c949c..4e8a3926ae 100644 --- a/src/libsodium/crypto_stream/aes128ctr/nacl/xor_afternm_aes128ctr.c +++ b/src/libsodium/crypto_stream/aes128ctr/nacl/xor_afternm_aes128ctr.c @@ -33,8 +33,8 @@ crypto_stream_aes128ctr_xor_afternm(unsigned char *out, const unsigned char *in, aes_uint128_t nonce_stack; unsigned long long lensav; unsigned char bl[128]; - unsigned char * blp; - unsigned char * np; + unsigned char *blp; + unsigned char *np; unsigned char b; uint32_t tmp; diff --git a/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c b/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c index 65229edfa0..7a19cebb01 100644 --- a/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c +++ b/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c @@ -84,7 +84,7 @@ chacha20_encrypt_bytes(chacha_ctx *ctx, const uint8_t *m, uint8_t *c, x15; uint32_t j0, j1, j2, j3, j4, j5, j6, j7, j8, j9, j10, j11, j12, j13, j14, j15; - uint8_t * ctarget = NULL; + uint8_t *ctarget = NULL; uint8_t tmp[64]; unsigned int i;