[pve-devel] applied: [PATCH common] Tools.pm: do not ignore "0" in split_list

Wolfgang Bumiller w.bumiller at proxmox.com
Wed Nov 21 11:07:05 CET 2018


applied

On Tue, Nov 20, 2018 at 12:45:15PM +0100, Dominik Csapak wrote:
> giving split_list the string "0" would actually return
> an empty list instead of a list with the element "0"
> 
> Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
> ---
>  src/PVE/Tools.pm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/PVE/Tools.pm b/src/PVE/Tools.pm
> index 0f31fdb..accf653 100644
> --- a/src/PVE/Tools.pm
> +++ b/src/PVE/Tools.pm
> @@ -640,7 +640,7 @@ sub pipe_socket_to_command  {
>  }
>  
>  sub split_list {
> -    my $listtxt = shift || '';
> +    my $listtxt = shift // '';
>  
>      return split (/\0/, $listtxt) if $listtxt =~ m/\0/;
>  
> -- 
> 2.11.0




More information about the pve-devel mailing list