all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH manager 0/1] pve8to9: fix package lookup empty result check
@ 2026-03-31  0:41 Kefu Chai
  2026-03-31  0:41 ` [PATCH manager 1/1] " Kefu Chai
  0 siblings, 1 reply; 2+ messages in thread
From: Kefu Chai @ 2026-03-31  0:41 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-31  0:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-31  0:41 [PATCH manager 0/1] pve8to9: fix package lookup empty result check Kefu Chai
2026-03-31  0:41 ` [PATCH manager 1/1] " Kefu Chai

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