[tools] testbot: Tweak the error groups iteration.
Francois Gouget
fgouget at codeweavers.com
Tue Apr 26 12:32:44 CDT 2022
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
testbot/bin/WineSendLog.pl | 2 +-
testbot/lib/WineTestBot/LogUtils.pm | 2 +-
testbot/web/JobDetails.pl | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl
index 954edaebd..37949e45f 100755
--- a/testbot/bin/WineSendLog.pl
+++ b/testbot/bin/WineSendLog.pl
@@ -350,7 +350,7 @@ EOF
next if (!$Group->{NewCount});
push @Messages, ($GroupName ? "\n$GroupName:\n" : "\n");
- foreach my $ErrIndex (0..@{$Group->{Errors}} - 1)
+ foreach my $ErrIndex (0..$#{$Group->{Errors}})
{
if ($Group->{IsNew}->[$ErrIndex])
{
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 0b2edf735..17cfc3525 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -1052,7 +1052,7 @@ sub _WriteLogErrorsToFh($$)
{
my $Group = $LogInfo->{ErrGroups}->{$GroupName};
print $Fh "g $Group->{LineNo} $GroupName\n";
- foreach my $Index (0..@{$Group->{Errors}} - 1)
+ foreach my $Index (0..$#{$Group->{Errors}})
{
my $IsNew = $Group->{IsNew}->[$Index] ? "n" : "o";
print $Fh "$IsNew $Group->{LineNos}->[$Index] $Group->{Errors}->[$Index]\n";
diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl
index 33a952553..c04266330 100644
--- a/testbot/web/JobDetails.pl
+++ b/testbot/web/JobDetails.pl
@@ -513,7 +513,7 @@ sub GenerateFullLog($$$$)
next if ($Group->{LineNo});
print "<div class='LogDllName'>$GroupName</div>\n";
- for my $ErrIndex (0..@{$Group->{Errors}} - 1)
+ for my $ErrIndex (0..$#{$Group->{Errors}})
{
if ($IsEmpty)
{
--
2.30.2
More information about the wine-devel
mailing list