From: Richard Levitte Date: Tue, 16 Jul 2024 04:52:07 +0000 (+0200) Subject: fix: Have util/mkerr.pl comply better with our coding style X-Git-Tag: openssl-3.4.0-alpha1~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=772481cf7c3f95e5c8d82ef4094d9030f8432460;p=thirdparty%2Fopenssl.git fix: Have util/mkerr.pl comply better with our coding style 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 Reviewed-by: Neil Horman Reviewed-by: Tomas Mraz Reviewed-by: Viktor Dukhovni (Merged from https://github.com/openssl/openssl/pull/24902) --- diff --git a/util/mkerr.pl b/util/mkerr.pl index 6f22bbd5827..ecea87b3808 100755 --- a/util/mkerr.pl +++ b/util/mkerr.pl @@ -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}