Преглед на файлове

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)
Dr. David von Oheimb преди 2 години
родител
ревизия
2e6afe1079
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      util/check-format.pl

+ 1 - 1
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