[pve-devel] applied: [PATCH common 1/4] restenv: remove unnecessary if

Fabian Grünbichler f.gruenbichler at proxmox.com
Fri Aug 18 11:09:11 CEST 2017


On Tue, Jul 25, 2017 at 03:32:20PM +0200, Thomas Lamprecht wrote:
> we return early from this function if the $rest_env singleton doesn't
> evaluates to true yet, so this check is useless here.
> 
> Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
> ---
>  src/PVE/RESTEnvironment.pm | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/src/PVE/RESTEnvironment.pm b/src/PVE/RESTEnvironment.pm
> index c528e61..2aee8de 100644
> --- a/src/PVE/RESTEnvironment.pm
> +++ b/src/PVE/RESTEnvironment.pm
> @@ -60,8 +60,7 @@ my $log_task_result = sub {
>  	$msg = $task->{status};
>      }
>  
> -    $rest_env->log_cluster_msg($pri, $user, "end task $upid $msg")
> -	if $rest_env;
> +    $rest_env->log_cluster_msg($pri, $user, "end task $upid $msg");
>  };
>  
>  my $worker_reaper = sub {
> -- 
> 2.11.0
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list