Skip to content

Commit 7a64e13

Browse files
authored
Merge pull request #270 from libtom/minor_changes
Minor changes
2 parents 385bae8 + 1fa8caf commit 7a64e13

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

src/stream/chacha/chacha_setup.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ int chacha_setup(chacha_state *st, const unsigned char *key, unsigned long keyle
3535
LTC_ARGCHK(key != NULL);
3636
LTC_ARGCHK(keylen == 32 || keylen == 16);
3737

38+
if (rounds == 0) rounds = 20;
39+
3840
LOAD32L(st->input[4], key + 0);
3941
LOAD32L(st->input[5], key + 4);
4042
LOAD32L(st->input[6], key + 8);

tests/test.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,7 @@ static ulong64 epoch_usec(void)
7373
return cur_time;
7474
#else
7575
struct timeval tv;
76-
struct timezone tz;
77-
gettimeofday(&tv, &tz);
76+
gettimeofday(&tv, NULL);
7877
return (ulong64)(tv.tv_sec) * 1000000 + (ulong64)(tv.tv_usec); /* get microseconds */
7978
#endif
8079
}

0 commit comments

Comments
 (0)