Skip to content
Snippets Groups Projects
Commit 941613c6 authored by Micah Elizabeth Scott's avatar Micah Elizabeth Scott
Browse files

hashx: minor, another logical operator change


The code style in equix and hashx sometimes uses bitwise operators
in place of logical ones in cases where it doesn't really matter
either way. This sometimes annoys our static analyzer tools.

Signed-off-by: default avatarMicah Elizabeth Scott <beth@torproject.org>
parent c40c5ade
No related branches found
No related tags found
1 merge request!712HashX bugfix and error path refactoring, for issue 40794
......@@ -712,8 +712,8 @@ bool hashx_program_generate(const siphash_state* key, hashx_program* program) {
/* reject programs that don't meet the uniform complexity requirements */
/* this happens in less than 1 seed out of 10000 */
return
(program->code_size == REQUIREMENT_SIZE) &
(ctx.mul_count == REQUIREMENT_MUL_COUNT) &
(program->code_size == REQUIREMENT_SIZE) &&
(ctx.mul_count == REQUIREMENT_MUL_COUNT) &&
(ctx.latency == REQUIREMENT_LATENCY - 1); /* cycles are numbered from 0 */
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment