Skip to content

Commit 5d8f35e

Browse files
authored
Merge pull request #397 from fperrad/20180601_lint
xsalsa20: some linting
2 parents b749325 + 57bffba commit 5d8f35e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/stream/salsa20/xsalsa20_setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static const char * const constants = "expand 32-byte k";
2929
/* use modified salsa20 doubleround (no final addition as in salsa20) */
3030
static void _xsalsa20_doubleround(ulong32 *x, int rounds)
3131
{
32-
int i = 0;
32+
int i;
3333

3434
for (i = rounds; i > 0; i -= 2) {
3535
/* columnround */
@@ -64,7 +64,7 @@ int xsalsa20_setup(salsa20_state *st, const unsigned char *key, unsigned long ke
6464
const int sti[] = {0, 5, 10, 15, 6, 7, 8, 9}; /* indices used to build subkey fm x */
6565
ulong32 x[64]; /* input to & output fm doubleround */
6666
unsigned char subkey[32];
67-
int i = 0;
67+
int i;
6868

6969
LTC_ARGCHK(st != NULL);
7070
LTC_ARGCHK(key != NULL);

src/stream/salsa20/xsalsa20_test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#ifdef LTC_XSALSA20
2020

2121
#ifdef LTC_SHA256
22-
int _sha256(unsigned char *hash, const unsigned char *data, const int datalen) {
22+
static int _sha256(unsigned char *hash, const unsigned char *data, const int datalen) {
2323
hash_state md;
2424
sha256_init(&md);
2525
sha256_process(&md, data, datalen);

0 commit comments

Comments
 (0)