From 772481cf7c3f95e5c8d82ef4094d9030f8432460 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 16 Jul 2024 06:52:07 +0200 Subject: 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) --- util/mkerr.pl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'util') diff --git a/util/mkerr.pl b/util/mkerr.pl index 6f22bbd582..ecea87b380 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} -- cgit v1.2.3