[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor] 02/07: hashx: minor, another logical operator change



This is an automated email from the git hooks/post-receive script.

dgoulet pushed a commit to branch main
in repository tor.

commit 941613c663785aaa401b723671bb8023cbb29eab
Author: Micah Elizabeth Scott <beth@xxxxxxxxxxxxxx>
AuthorDate: Wed May 24 13:20:58 2023 -0700

    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@xxxxxxxxxxxxxx>
---
 src/ext/equix/hashx/src/program.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/ext/equix/hashx/src/program.c b/src/ext/equix/hashx/src/program.c
index f144ce14a0..b44bdb855a 100644
--- a/src/ext/equix/hashx/src/program.c
+++ b/src/ext/equix/hashx/src/program.c
@@ -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 */
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits