Skip to content

Commit

Permalink
check-format.pl: Fix report on constant on LHS of comparison or assig…
Browse files Browse the repository at this point in the history
…nment

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from openssl#17396)
  • Loading branch information
DDvO committed Jan 4, 2022
1 parent 068549f commit 2e6afe1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/check-format.pl
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ sub check_nested_nonblock_indents {
report("single-letter name '$2'") if (m/(^|.*\W)([IO])(\W.*|$)/); # single-letter name 'I' or 'O' # maybe re-add 'l'?
# constant on LHS of comparison or assignment, e.g., NULL != x or 'a' < c, but not a + 1 == b
report("constant on LHS of '$2'")
report("constant on LHS of '$3'")
if (m/(['"]|([\+\-\*\/\/%\&\|\^<>]\s*)?\W[0-9]+L?|NULL)\s*([\!<>=]=|[<=>][^<>])/ && $2 eq "");
# TODO report #if 0 and #if 1
Expand Down

0 comments on commit 2e6afe1

Please sign in to comment.