1

buildinfo.pm: fix 2 syntax errors

This commit is contained in:
eleksir
2020-04-12 02:44:45 +03:00
parent e481a9bdeb
commit cb18990049

View File

@@ -42,13 +42,12 @@ sub buildinfo($) {
return ('500', $content, "Unable to read $c->{buildinfo}->{$config}: $!\n"); return ('500', $content, "Unable to read $c->{buildinfo}->{$config}: $!\n");
} }
if ($len != $readlen)) { if ($len != $readlen) {
warn "[FATA] Size of $c->{buildinfo}->{$config} $len bytes but actually read $readlen bytes"; warn "[FATA] Size of $c->{buildinfo}->{$config} $len bytes but actually read $readlen bytes";
return ('500', $content, "Unable to read $c->{buildinfo}->{$config}\n"); return ('500', $content, "Unable to read $c->{buildinfo}->{$config}\n");
} }
close JSON; close JSON;
$/ = $sep;
my $j = eval { decode_json($json) } or do { my $j = eval { decode_json($json) } or do {
$status = '500'; $status = '500';