mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
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: Micah Elizabeth Scott <beth@torproject.org>
This commit is contained in:
parent
c40c5adec2
commit
941613c663
@ -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 */
|
/* reject programs that don't meet the uniform complexity requirements */
|
||||||
/* this happens in less than 1 seed out of 10000 */
|
/* this happens in less than 1 seed out of 10000 */
|
||||||
return
|
return
|
||||||
(program->code_size == REQUIREMENT_SIZE) &
|
(program->code_size == REQUIREMENT_SIZE) &&
|
||||||
(ctx.mul_count == REQUIREMENT_MUL_COUNT) &
|
(ctx.mul_count == REQUIREMENT_MUL_COUNT) &&
|
||||||
(ctx.latency == REQUIREMENT_LATENCY - 1); /* cycles are numbered from 0 */
|
(ctx.latency == REQUIREMENT_LATENCY - 1); /* cycles are numbered from 0 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user