]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
fix: Have util/mkerr.pl comply better with our coding style
authorRichard Levitte <levitte@openssl.org>
Tue, 16 Jul 2024 04:52:07 +0000 (06:52 +0200)
committerRichard Levitte <levitte@openssl.org>
Wed, 21 Aug 2024 08:55:59 +0000 (10:55 +0200)
util/mkerr.pl produced lines like these:

    {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE),
    "operation not supported for this keytype"},

According to our coding style, they should look like this:

    {ERR_PACK(ERR_LIB_EVP, 0, EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE),
     "operation not supported for this keytype"},

This nit was correctly picked up by util/check-format.pl

Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/24902)

util/mkerr.pl

index 6f22bbd5827e9e2bfa979a29eeb92ac3a2270499..ecea87b3808f603f687abb51e98b8be15198236d 100755 (executable)
@@ -567,12 +567,11 @@ EOF
                 $rn =~ tr/_[A-Z]/ [a-z]/;
                 $strings{$i} = $rn;
             }
-            my $short = "    {ERR_PACK($pack_lib, 0, $i), \"$rn\"},";
-            if ( length($short) <= 80 ) {
-                print OUT "$short\n";
-            } else {
-                print OUT "    {ERR_PACK($pack_lib, 0, $i),\n    \"$rn\"},\n";
-            }
+            my $lines;
+            $lines = "    {ERR_PACK($pack_lib, 0, $i), \"$rn\"},";
+            $lines = "    {ERR_PACK($pack_lib, 0, $i),\n     \"$rn\"},"
+                if length($lines) > 80;
+            print OUT "$lines\n";
         }
         print OUT <<"EOF";
     {0, NULL}