summaryrefslogtreecommitdiff
path: root/lib/regex_internal.c
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2014-08-01 07:34:42 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2014-08-01 07:37:45 +0530
commitd8401629f49fed515e7cab4cbb3a04d820969c1c (patch)
tree82a27ebb148acb5d7982c87a05531b4bc50c7aa5 /lib/regex_internal.c
parenta5f2a6d5c1682ea432e703ab30f82071b30ab30a (diff)
downloadgnulib-d8401629f49fed515e7cab4cbb3a04d820969c1c.tar.gz
Use consistent style to check DEBUG macro in regex_internal.c
The DEBUG macro is checked using both #if and #ifdef in regex_internal.c. Make this consistent with mktime, where we use "#if defined DEBUG && DEBUG", to be compatible with gnulib as well as glibc style. regex: Make #if/#ifdef usage consistent for DEBUG * lib/regex_internal.c: Use "#if defined DEBUG && DEBUG" instead of the inconsistent usage of #if and #ifdef as that works with both Glibc and Gnulib's style.
Diffstat (limited to 'lib/regex_internal.c')
-rw-r--r--lib/regex_internal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/regex_internal.c b/lib/regex_internal.c
index 79181a3314..92d48b5232 100644
--- a/lib/regex_internal.c
+++ b/lib/regex_internal.c
@@ -677,7 +677,7 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
pstr->valid_len - offset);
pstr->valid_len -= offset;
pstr->valid_raw_len -= offset;
-#if DEBUG
+#if defined DEBUG && DEBUG
assert (pstr->valid_len > 0);
#endif
}
@@ -936,7 +936,7 @@ re_string_context_at (const re_string_t *input, Idx idx, int eflags)
Idx wc_idx = idx;
while(input->wcs[wc_idx] == WEOF)
{
-#ifdef DEBUG
+#if defined DEBUG && DEBUG
/* It must not happen. */
assert (REG_VALID_INDEX (wc_idx));
#endif