From: Richard Levitte Date: Tue, 27 Jun 2017 11:47:22 +0000 (+0200) Subject: util/mkerr.pl: avoid getting an annoying warning about negative count X-Git-Tag: OpenSSL_1_1_1-pre1~1197 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0ffdaebf9a327f3b356df1cf72d74dd15ead7d13;p=oweals%2Fopenssl.git util/mkerr.pl: avoid getting an annoying warning about negative count Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/3781) --- diff --git a/util/mkerr.pl b/util/mkerr.pl index 6bc27c498b..51177b9d41 100755 --- a/util/mkerr.pl +++ b/util/mkerr.pl @@ -486,6 +486,7 @@ EOF print OUT "\n/*\n * $lib function codes.\n */\n"; foreach my $i ( @function ) { my $z = 48 - length($i); + $z = 0 if $z < 0; if ( $fcodes{$i} eq "X" ) { $fassigned{$lib} =~ m/^:([^:]*):/; my $findcode = $1; @@ -503,6 +504,7 @@ EOF print OUT "\n/*\n * $lib reason codes.\n */\n"; foreach my $i ( @reasons ) { my $z = 48 - length($i); + $z = 0 if $z < 0; if ( $rcodes{$i} eq "X" ) { $rassigned{$lib} =~ m/^:([^:]*):/; my $findcode = $1;