]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
minor code style clenaup and comment wording
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 28 May 2022 07:12:21 +0000 (09:12 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 28 May 2022 07:12:21 +0000 (09:12 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Cluster.pm
PVE/Service/pvestatd.pm

index 1f4f4b08721728bd346f8368151876966eb4efc0..525a95a17bc5a81357caea09ed0b34b23a07a89a 100644 (file)
@@ -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});
index b1e71ec8fc00ac39a5f084a00f5c94dff129eb57..72445ec0c2b20fa695c0434d21f851030c017ba7 100755 (executable)
@@ -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 {