00db10
commit 78dd658a025fb16d004677284b4db0d0c0191845
00db10
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
00db10
Date:   Fri Aug 1 14:24:41 2014 +0530
00db10
00db10
    Check if DEBUG is defined in regex_internal.c
00db10
    
00db10
    The DEBUG macro is checked for its value in one place and if it is
00db10
    defined in another.  Make this consistent across the two cases and use
00db10
    the same style that we did in mktime.c, which is to check if the macro
00db10
    is defined and it is set.
00db10
00db10
diff --git a/posix/regex_internal.c b/posix/regex_internal.c
00db10
index 9be8a532e6d34150..1765035f06e906e5 100644
00db10
--- a/posix/regex_internal.c
00db10
+++ b/posix/regex_internal.c
00db10
@@ -679,7 +679,7 @@ re_string_reconstruct (re_string_t *pstr, int idx, int eflags)
00db10
 			 pstr->valid_len - offset);
00db10
 	      pstr->valid_len -= offset;
00db10
 	      pstr->valid_raw_len -= offset;
00db10
-#if DEBUG
00db10
+#if defined DEBUG && DEBUG
00db10
 	      assert (pstr->valid_len > 0);
00db10
 #endif
00db10
 	    }
00db10
@@ -936,7 +936,7 @@ re_string_context_at (const re_string_t *input, int idx, int eflags)
00db10
       int wc_idx = idx;
00db10
       while(input->wcs[wc_idx] == WEOF)
00db10
 	{
00db10
-#ifdef DEBUG
00db10
+#if defined DEBUG && DEBUG
00db10
 	  /* It must not happen.  */
00db10
 	  assert (wc_idx >= 0);
00db10
 #endif