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-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, T_SCC_BODY_TEXT_LINE 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 445A81F688 for ; Sat, 10 Sep 2022 08:18:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1662797937; bh=5AotUpTV93Npa+MqSzSBCl0yjBO/xDAokHefUXMDHuk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=si0fA/xU7a2ZAdk7TbkCpI6IB0NGj1V+lXFK1YpLnaHROlO6erXcf9uDGXBzkpbrF iFIunzDJsRSxcUQzRVeZXVbTQsImzxQvOydsDflcxeCW6JLCoFPJAS0L6LdBmAUq5j PIA4dBcuwduPewcltZ0skfFh/Z46i6T+LZoFsc1Q= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 30/38] viewdiff: diff_header: shorten function, slightly Date: Sat, 10 Sep 2022 08:17:21 +0000 Message-Id: <20220910081729.2011934-31-e@80x24.org> In-Reply-To: <20220910081729.2011934-1-e@80x24.org> References: <20220910081729.2011934-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: It makes for easier reading with gigantic fonts. --- lib/PublicInbox/ViewDiff.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/PublicInbox/ViewDiff.pm b/lib/PublicInbox/ViewDiff.pm index b9115669..fba3d76c 100644 --- a/lib/PublicInbox/ViewDiff.pm +++ b/lib/PublicInbox/ViewDiff.pm @@ -124,12 +124,8 @@ sub diff_header ($$$) { $dctx->{Q} = '?b='.uri_escape_path($pb); } else { my @q; - if ($pb ne '/dev/null') { - push @q, 'b='.uri_escape_path($pb); - } - if ($pa ne '/dev/null') { - push @q, 'a='.uri_escape_path($pa); - } + push @q, 'b='.uri_escape_path($pb) if $pb ne '/dev/null'; + push @q, 'a='.uri_escape_path($pa) if $pa ne '/dev/null'; $dctx->{Q} = '?'.join('&', @q); }