bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: import.c: heisenbug detected


From: Mark D. Baushke
Subject: Re: import.c: heisenbug detected
Date: Mon, 21 Feb 2005 10:53:56 -0800

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Frank,

Good catch. Patch committed to 1.11.x and 1.12.x.

        Thanks,
        -- Mark

2005-02-21  Mark D. Baushke  <mdb@cvshome.org>

        * import.c (import): Avoid using assert with side effects it may
        be configured away using NDEBUG.
        (Patch from Frank Hemer <frank@hemer.org>.)

Index: import.c
===================================================================
RCS file: /cvs/ccvs/src/import.c,v
retrieving revision 1.133.4.12
diff -u -p -u -p -r1.133.4.12 import.c
- --- import.c  31 Jan 2005 22:15:11 -0000      1.133.4.12
+++ import.c    21 Feb 2005 18:44:29 -0000
@@ -219,8 +219,9 @@ import (argc, argv)
      */
     {
        regex_t pat;
- -     assert (!regcomp (&pat, "^[1-9][0-9]*\\.[1-9][0-9]*\\.[1-9][0-9]*$",
- -                       REG_EXTENDED));
+       int ret = regcomp (&pat, "^[1-9][0-9]*\\.[1-9][0-9]*\\.[1-9][0-9]*$",
+                          REG_EXTENDED);
+       assert (!ret);
        if (regexec (&pat, vbranch, 0, NULL, 0))
        {
            error (1, 0,
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFCGi5E3x41pRYZE/gRAmePAKC8dj7slUts/USATh++/SBEAgnBvACgg44m
T42k5+yA/JSrOAzaI56TgJ0=
=uEVw
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]