bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: bug-gnulib@gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: [PATCH 05/10] regex-tests: fix typo
Date: Fri,  5 Feb 2021 17:25:57 -0800	[thread overview]
Message-ID: <20210206012602.2257711-5-eggert@cs.ucla.edu> (raw)
In-Reply-To: <20210206012602.2257711-1-eggert@cs.ucla.edu>

* tests/test-regex.c (main): Fix typo that would have caused an
old test case to report incorrect values on failure.
---
 ChangeLog          | 4 ++++
 tests/test-regex.c | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 82aa61a04..f4583e0af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2021-02-05  Paul Eggert  <eggert@cs.ucla.edu>
 
+	regex-tests: fix typo
+	* tests/test-regex.c (main): Fix typo that would have caused an
+	old test case to report incorrect values on failure.
+
 	regex: make it easier to merge into glibc
 	* lib/regex_internal.h [_LIBC]: Do not include Gnulib’s dynarray.h.
 
diff --git a/tests/test-regex.c b/tests/test-regex.c
index 4a4ff39fd..58f8200f2 100644
--- a/tests/test-regex.c
+++ b/tests/test-regex.c
@@ -290,7 +290,8 @@ main (void)
     {
       memset (&regs, 0, sizeof regs);
       static char const data[] = "WXY";
-      if (re_search (&regex, data, sizeof data - 1, 0, 3, &regs) < 0)
+      i = re_search (&regex, data, sizeof data - 1, 0, 3, &regs);
+      if (i < 0)
         report_error ("re_search '%s' on '%s' returned %d", pat_x, data, i);
       regfree (&regex);
       free (regs.start);
-- 
2.27.0



  parent reply	other threads:[~2021-02-06  1:27 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-06  1:25 [PATCH 01/10] regex: improve comments Paul Eggert
2021-02-06  1:25 ` [PATCH 02/10] regex: avoid undefined behavior Paul Eggert
2021-02-06  1:25 ` [PATCH 03/10] regex: minor refactoring Paul Eggert
2021-02-06  1:25 ` [PATCH 04/10] regex: make it easier to merge into glibc Paul Eggert
2021-02-06  1:25 ` Paul Eggert [this message]
2021-02-06  1:25 ` [PATCH 06/10] regex: avoid duplicate in espilon closure Paul Eggert
2021-02-06  1:25 ` [PATCH 07/10] regex: fix longstanding backref match bug Paul Eggert
2021-02-09 19:42   ` Adhemerval Zanella
2021-02-09 22:22     ` Paul Eggert
2021-04-16 21:37   ` Dmitry V. Levin
2021-02-06  1:26 ` [PATCH 08/10] regex: debug check for set member duplicates Paul Eggert
2021-02-06  1:26 ` [PATCH 09/10] regex-tests: add bug 11053 test Paul Eggert
2021-02-06  1:26 ` [PATCH 10/10] regex: fix comment location Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210206012602.2257711-5-eggert@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=bug-gnulib@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).