about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2020-12-18 11:54:37 +0000
committerEric Wong <e@80x24.org>2020-12-18 20:53:43 +0000
commitfef8202d2e176bc93fce94c7be82ebab936a43da (patch)
treef5cec855a2cfd1402131675b74455a4564ff7e2a
parentcd12cf22c4d161b7aec819f45628b983f0bd675d (diff)
downloadpublic-inbox-fef8202d2e176bc93fce94c7be82ebab936a43da.tar.gz
So we don't trigger an uninitialized variable warning :x
-rw-r--r--lib/PublicInbox/NNTPD.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/NNTPD.pm b/lib/PublicInbox/NNTPD.pm
index 953228d0..7f9a1d58 100644
--- a/lib/PublicInbox/NNTPD.pm
+++ b/lib/PublicInbox/NNTPD.pm
@@ -38,8 +38,8 @@ sub refresh_groups {
         my $groups = $pi_cfg->{-by_newsgroup}; # filled during each_inbox
         $pi_cfg->each_inbox(sub {
                 my ($ibx) = @_;
-                my $ngname = $ibx->{newsgroup};
-                if (defined($ngname) && $ibx->nntp_usable) {
+                my $ngname = $ibx->{newsgroup} // return;
+                if ($ibx->nntp_usable) {
                         # only valid if msgmap and over works
                         # preload to avoid fragmentation:
                         $ibx->description;