From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 8072520083 for ; Tue, 2 Feb 2021 11:47:03 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 11/16] pktop: fix potential undefined var Date: Tue, 2 Feb 2021 11:46:57 +0000 Message-Id: <20210202114702.29886-12-e@80x24.org> In-Reply-To: <20210202114702.29886-1-e@80x24.org> References: <20210202114702.29886-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: In case we have other bugs in our code. --- lib/PublicInbox/PktOp.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/PktOp.pm b/lib/PublicInbox/PktOp.pm index 12839e71..59b37ff8 100644 --- a/lib/PublicInbox/PktOp.pm +++ b/lib/PublicInbox/PktOp.pm @@ -58,7 +58,7 @@ sub event_step { die "recv: $!"; } my ($cmd, $pargs) = split(/\0/, $msg, 2); - my $op = $self->{ops}->{$cmd // $msg}; + my $op = $self->{ops}->{$cmd //= $msg}; die "BUG: unknown message: `$cmd'" unless $op; my ($sub, @args) = @$op; $sub->(@args, $pargs ? ipc_thaw($pargs) : ());