From patchwork Mon Jul 22 18:19:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Beat Bolli X-Patchwork-Id: 11053269 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8663513AC for ; Mon, 22 Jul 2019 18:29:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78BF621FAD for ; Mon, 22 Jul 2019 18:29:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6C9F226E76; Mon, 22 Jul 2019 18:29:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C29D821FAD for ; Mon, 22 Jul 2019 18:29:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728808AbfGVS32 (ORCPT ); Mon, 22 Jul 2019 14:29:28 -0400 Received: from s019.cyon.net ([149.126.4.28]:58592 "EHLO s019.cyon.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726291AbfGVS32 (ORCPT ); Mon, 22 Jul 2019 14:29:28 -0400 X-Greylist: delayed 595 seconds by postgrey-1.27 at vger.kernel.org; Mon, 22 Jul 2019 14:29:27 EDT Received: from [10.20.10.231] (port=63074 helo=mail.cyon.ch) by s019.cyon.net with esmtpa (Exim 4.92) (envelope-from ) id 1hpcuH-0002Ug-BV; Mon, 22 Jul 2019 20:19:31 +0200 Received: by drbeat.li (Postfix, from userid 1000) id 27A21180402; Mon, 22 Jul 2019 20:19:29 +0200 (CEST) From: Beat Bolli To: git@vger.kernel.org Cc: gitster@pobox.com, Beat Bolli Subject: [PATCH] grep: print the pcre2_jit_on value Date: Mon, 22 Jul 2019 20:19:23 +0200 Message-Id: <20190722181923.21572-1-dev+git@drbeat.li> X-Mailer: git-send-email 2.21.0.1020.gf2820cf01a MIME-Version: 1.0 X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s019.cyon.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - drbeat.li X-Get-Message-Sender-Via: s019.cyon.net: authenticated_id: ig@drbeat.li X-Authenticated-Sender: s019.cyon.net: ig@drbeat.li X-Source: X-Source-Args: X-Source-Dir: Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When pcre2_jit_on is neither 1 nor 0, the BUG() call printed the value of pcre1_jit_on. Print the value of pcre2_jit_on instead. Signed-off-by: Beat Bolli --- grep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grep.c b/grep.c index f7c3a5803e..cd952ef5d3 100644 --- a/grep.c +++ b/grep.c @@ -559,7 +559,7 @@ static void compile_pcre2_pattern(struct grep_pat *p, const struct grep_opt *opt pcre2_jit_stack_assign(p->pcre2_match_context, NULL, p->pcre2_jit_stack); } else if (p->pcre2_jit_on != 0) { BUG("The pcre2_jit_on variable should be 0 or 1, not %d", - p->pcre1_jit_on); + p->pcre2_jit_on); } }