No need to check for the same condition twice

This commit is contained in:
Jamie Cameron
2025-04-15 21:16:49 -07:00
parent 4b927ed588
commit f15b147bd0

View File

@@ -1785,9 +1785,8 @@ for(my $i=0; my @stack_ = caller($i); $i++) {
push(@stack, \@stack_);
}
my $err_caller;
$err_caller = "$stack[0]->[1] (line $stack[0]->[2])"
if ($stack[0]->[1] && $stack[0]->[2]);
if ($err_caller) {
if ($stack[0]->[1] && $stack[0]->[2]) {
$err_caller = "$stack[0]->[1] (line $stack[0]->[2])";
$err_caller =~ s/$root_directory\///;
$err_caller = $msg ? "$msg $err_caller" : $err_caller;
}