marsadm: fix annoying warning

This commit is contained in:
Thomas Schoebel-Theuer 2021-04-09 10:31:56 +02:00
parent eb86a4e275
commit 7250c6c828
1 changed files with 2 additions and 1 deletions

View File

@ -7278,7 +7278,8 @@ sub eval_fn {
$peer = $$env{"host"} unless $peer;
return 0 if eval_fn($env, "is-primary", $peer);
my $replay = get_link($$env{"resdir"} . "/replay-$peer", 1);
$replay =~ m/^(log-[^,]+),([0-9]*)/;
my $matches = $replay =~ m/^(log-[^,]+),([0-9]*)/;
return 1 unless $matches;
my $logfile = $$env{"resdir"} . "/" . $1;
my $logpos = $2;
if (! -r $logfile) {