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: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.0 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id AC29E1F670 for ; Tue, 19 Oct 2021 08:20:03 +0000 (UTC) Received: from localhost ([::1]:52446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mckLq-0005Wu-BO for normalperson@yhbt.net; Tue, 19 Oct 2021 04:20:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mckAg-0006nu-AQ for bug-gnulib@gnu.org; Tue, 19 Oct 2021 04:08:31 -0400 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:47238) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mckAc-0007hy-Iz for bug-gnulib@gnu.org; Tue, 19 Oct 2021 04:08:29 -0400 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 01778160097 for ; Tue, 19 Oct 2021 01:08:24 -0700 (PDT) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 4_TS1-U_uova; Tue, 19 Oct 2021 01:08:23 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 510EA16008C; Tue, 19 Oct 2021 01:08:23 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 3wN7UPxdabUR; Tue, 19 Oct 2021 01:08:23 -0700 (PDT) Received: from day.example.com (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 25B1D160083; Tue, 19 Oct 2021 01:08:23 -0700 (PDT) From: Paul Eggert To: bug-gnulib@gnu.org Subject: [PATCH] regex: improve comment Date: Tue, 19 Oct 2021 01:08:19 -0700 Message-Id: <20211019080819.374098-1-eggert@cs.ucla.edu> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=131.179.128.68; envelope-from=eggert@cs.ucla.edu; helo=zimbra.cs.ucla.edu X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Eggert Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" --- lib/regexec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/regexec.c b/lib/regexec.c index a955aa218..106f9d7ff 100644 --- a/lib/regexec.c +++ b/lib/regexec.c @@ -758,8 +758,7 @@ re_search_internal (const regex_t *preg, const char *= string, Idx length, =20 offset =3D match_first - mctx.input.raw_mbs_idx; } - /* If MATCH_FIRST is out of the buffer, leave it as '\0'. - Note that MATCH_FIRST must not be smaller than 0. */ + /* If OFFSET is out of the buffer, leave CH as '\0'. */ ch =3D (mctx.input.valid_len <=3D offset ? 0 : re_string_byte_at (&mctx.input, offset)); if (fastmap[ch]) --=20 2.32.0