From: Thomas Lamprecht Date: Sat, 28 May 2022 07:12:21 +0000 (+0200) Subject: minor code style clenaup and comment wording X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=8317bac789ae77fcfacf947532c1c962a863c28f;p=pve-manager-legacy.git minor code style clenaup and comment wording Signed-off-by: Thomas Lamprecht --- diff --git a/PVE/API2/Cluster.pm b/PVE/API2/Cluster.pm index 1f4f4b08..525a95a1 100644 --- a/PVE/API2/Cluster.pm +++ b/PVE/API2/Cluster.pm @@ -496,13 +496,11 @@ __PACKAGE__->register_method({ my $authuser = $rpcenv->get_user(); my $tlist = PVE::Cluster::get_tasklist(); - - my $res = []; - - return $res if !$tlist; + return [] if !$tlist; my $all = $rpcenv->check($authuser, "/", [ 'Sys.Audit' ], 1); + my $res = []; foreach my $task (@$tlist) { if (PVE::AccessControl::pve_verify_tokenid($task->{user}, 1)) { ($task->{user}, $task->{tokenid}) = PVE::AccessControl::split_tokenid($task->{user}); diff --git a/PVE/Service/pvestatd.pm b/PVE/Service/pvestatd.pm index b1e71ec8..72445ec0 100755 --- a/PVE/Service/pvestatd.pm +++ b/PVE/Service/pvestatd.pm @@ -503,10 +503,8 @@ my sub broadcast_version_info : prototype() { } sub update_status { - - # update worker list. This is not really required and - # we just call this to make sure that we have a correct - # list in case of an unexpected crash. + # update worker list. This is not really required, but we want to make sure that we also have a + # correct list in case of an unexpected crash. my $rpcenv = PVE::RPCEnvironment::get(); eval {