summaryrefslogtreecommitdiffstats
path: root/util
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 <David.von.Oheimb@siemens.com>2022-07-20 13:05:19 +0200
commitfce3dbc0389b4021c9dba205ac8ef25c6786da93 (patch)
treefa01b01bf6282ff94179f6f139a339f44a5de66b /util
parentcc90ba66062afc27e31e403613711dba5a7475a8 (diff)
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> (cherry picked from commit 2e6afe1079c6993868c5d8a813605d16980e8e10)
Diffstat (limited to 'util')
-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