[pve-devel] dropped series: [PATCH qemu-server 1/2] print_cpu_device: cleanup default values

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue May 23 14:29:25 CEST 2017


applied the earlier bug fix by Tobias Böhm instead, and a cleanup
removing the sockets variable which is unused.

@Thomas: if you want to refactor this further, feel free ;)

On Wed, May 17, 2017 at 09:47:27AM +0200, Fabian Grünbichler wrote:
> for consistency's sake
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
>  PVE/QemuServer.pm | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
> index 2fb419d..ed6c598 100644
> --- a/PVE/QemuServer.pm
> +++ b/PVE/QemuServer.pm
> @@ -1720,9 +1720,8 @@ sub print_cpu_device {
>  	$cpu = $cpuconf->{cputype};
>      }
>  
> -    my $sockets = 1;
> -    $sockets = $conf->{sockets} if  $conf->{sockets};
> -    my $cores = $conf->{cores} || 1;
> +    my $sockets = $conf->{sockets} // 1;
> +    my $cores = $conf->{cores} // 1;
>  
>      my $current_core = ($id - 1) % $cores;
>      my $current_socket = int(($id - $current_core)/$cores);
> -- 
> 2.1.4
> 
> 
> _______________________________________________
> 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