[pve-devel] [PATCH v2 http-server 1/2] AnyEvent: whitespace fix

Matthias Heiserer m.heiserer at proxmox.com
Fri May 13 15:48:59 CEST 2022


and remove unnecessary parentheses.

Signed-off-by: Matthias Heiserer <m.heiserer at proxmox.com>
---

Changes from v1:
new patch

 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 7dd7d2d..b8bc35d 100644
--- a/src/PVE/APIServer/AnyEvent.pm
+++ b/src/PVE/APIServer/AnyEvent.pm
@@ -1161,7 +1161,6 @@ sub file_upload_multipart {
     eval {
 	my $boundary = $rstate->{boundary};
 	my $hdl = $reqstate->{hdl};
-
 	my $startlen = length($hdl->{rbuf});
 
 	if ($rstate->{phase} == 0) { # skip everything until start
@@ -1245,7 +1244,7 @@ sub file_upload_multipart {
 	    substr($hdl->{rbuf}, 0, $len, ''); # empty rbuf
 	}
 
-	$rstate->{read} += ($startlen - length($hdl->{rbuf}));
+	$rstate->{read} += $startlen - length($hdl->{rbuf});
 
 	if (!$rstate->{done} && ($rstate->{read} + length($hdl->{rbuf})) >= $rstate->{size}) {
 	    $rstate->{done} = 1; # make sure we dont get called twice
-- 
2.30.2





More information about the pve-devel mailing list