summaryrefslogtreecommitdiff
path: root/util/check-format.pl
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-11-12 12:14:45 +0100
committerDr. David von Oheimb <dev@ddvo.net>2022-01-04 15:25:54 +0100
commit2e6afe1079c6993868c5d8a813605d16980e8e10 (patch)
tree7c7951700d8de9f153e7dd9146673515f69929b0 /util/check-format.pl
parent068549f8db6d792a88bb888118001c4582f79074 (diff)
downloadopenssl-new-2e6afe1079c6993868c5d8a813605d16980e8e10.tar.gz
check-format.pl: Fix report on constant on LHS of comparison or assignment
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17396)
Diffstat (limited to 'util/check-format.pl')
-rwxr-xr-xutil/check-format.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/check-format.pl b/util/check-format.pl
index 62471e3c68..09bd6b6270 100755
--- a/util/check-format.pl
+++ b/util/check-format.pl
@@ -858,7 +858,7 @@ while (<>) { # loop over all lines of all input files
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