Mercurial > hg > octave-nkf > gnulib-hg
changeset 17733:712a0a776487
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.
author | Siddhesh Poyarekar <siddhesh@redhat.com> |
---|---|
date | Fri, 01 Aug 2014 07:34:42 +0530 |
parents | 6d92afe34a82 |
children | 3fdc2d6e6d81 |
files | ChangeLog lib/regex_internal.c |
diffstat | 2 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2014-08-01 Siddhesh Poyarekar <siddhesh@redhat.com> + + 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. + 2014-07-31 Eric Blake <eblake@redhat.com> openat-die: use _Noreturn markup
--- a/lib/regex_internal.c +++ b/lib/regex_internal.c @@ -677,7 +677,7 @@ 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 @@ 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