Skip to content

Commit f07f8b8

Browse files
committed
code cleanup
Signed-off-by: Stephan Mueller <smueller@chronox.de>
1 parent 43b02d6 commit f07f8b8

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

sym/src/asm/AVX512/chacha20_impl_avx512.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ int cc20_crypt_bytes_avx512(uint32_t *state, const uint8_t *in, uint8_t *out,
105105
__m512i ctr_increment;
106106
__m512i P1, P2, P3, P4;
107107
__m512i X0_0, X0_1, X0_2, X0_3;
108-
#ifdef DISABLE_16_BLOCKS
108+
#ifndef DISABLE_16_BLOCKS
109109
__m512i X1_0, X1_1, X1_2, X1_3;
110110
__m512i X2_0, X2_1, X2_2, X2_3;
111111
__m512i X3_0, X3_1, X3_2, X3_3;

sym/src/chacha20.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,10 +191,9 @@ LC_INTERFACE_FUNCTION(void, cc20_block, struct lc_sym_state *state,
191191
void cc20_crypt_remaining(struct lc_sym_state *ctx, const uint8_t **in,
192192
uint8_t **out, size_t *len)
193193
{
194-
const uint8_t *inp = *in;
195-
uint8_t *outp = *out;
196-
197194
if (ctx->keystream_ptr) {
195+
const uint8_t *inp = *in;
196+
uint8_t *outp = *out;
198197
size_t todo =
199198
min_size(*len, LC_CC20_BLOCK_SIZE - ctx->keystream_ptr);
200199

0 commit comments

Comments
 (0)