all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Kefu Chai <k.chai@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH manager 0/1] pve8to9: fix package lookup empty result check
Date: Tue, 31 Mar 2026 08:41:18 +0800	[thread overview]
Message-ID: <20260331004119.707556-1-k.chai@proxmox.com> (raw)

I am new to Perl and noticed this while reading the code. I verified the
bug with a small test:

  perl -e '
    my $pkgs = [ grep { 0 } (1,2,3) ];
    print "Defined\n" if defined $pkgs;
    print "Zero\n"    if $pkgs == 0;
  '

Output:
  Defined

'$pkgs == 0' printed nothing -- the array reference is never numerically
zero, so the empty result check silently passed through even when the
grep returned no results.

Kefu Chai (1):
  pve8to9: fix package lookup empty result check

 PVE/CLI/pve8to9.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.47.3





             reply	other threads:[~2026-03-31  0:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-31  0:41 Kefu Chai [this message]
2026-03-31  0:41 ` [PATCH manager 1/1] " Kefu Chai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260331004119.707556-1-k.chai@proxmox.com \
    --to=k.chai@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal