From 42ec24969fb6e61c49e96718eb086b6d3d4523b9 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Thu, 29 Sep 2022 16:26:13 +0200 Subject: [PATCH] multipart upload: drop unused variables Signed-off-by: Thomas Lamprecht --- src/PVE/APIServer/AnyEvent.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/PVE/APIServer/AnyEvent.pm b/src/PVE/APIServer/AnyEvent.pm index 6a201bc..4e1f753 100644 --- a/src/PVE/APIServer/AnyEvent.pm +++ b/src/PVE/APIServer/AnyEvent.pm @@ -1183,7 +1183,6 @@ sub file_upload_multipart { my ($self, $reqstate, $auth, $method, $path, $rstate) = @_; my $trim = sub { - my ($string) = @_; $_[0] =~ /\s*(\S+)/; return $1; }; @@ -1249,7 +1248,7 @@ sub file_upload_multipart { # Phase 2 - dump content into file if ($rstate->{phase} == 2) { if ($hdl->{rbuf} =~ s/^(.*?)${newline}?+${closeDelimiter}.*$//s) { - my ($rest, $eof) = ($1, $3); + my $rest = $1; my $len = length($rest); die "write to temporary file failed - $!" if syswrite($rstate->{outfh}, $rest) != $len;