]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
check-format.pl: fix detection of '#ifdef __cplusplus'
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>
Wed, 30 Nov 2022 20:12:20 +0000 (21:12 +0100)
committerTomas Mraz <tomas@openssl.org>
Wed, 8 Feb 2023 15:22:06 +0000 (16:22 +0100)
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19796)

util/check-format.pl

index 8303c7823ff7c086ffcaeaed52ff874158357be4..21ecaf0aa6561a5dcf1ec02585a70760aba9c03e 100755 (executable)
@@ -715,7 +715,7 @@ while (<>) { # loop over all lines of all input files
         my $space_count = length($space); # maybe could also use indentation before '#'
         report("'#if' nesting indent = $space_count != $preproc_if_nesting") if $space_count != $preproc_if_nesting;
         $preproc_if_nesting++ if $preproc_directive =~ m/^(if|ifdef|ifndef|else|elif)$/;
-        $ifdef__cplusplus = $preproc_directive eq "ifdef2" && m/\s+__cplusplus\s*$/;
+        $ifdef__cplusplus = $preproc_directive eq "ifdef" && m/\s+__cplusplus\s*$/;
 
         # handle indentation of preprocessor directive independently of surrounding normal code
         $count = -1; # do not check indentation of first line of preprocessor directive