From patchwork Thu Jul 31 20:41:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 2264 Received: (qmail 4789 invoked by alias); 31 Jul 2014 20:42:04 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 4778 invoked by uid 89); 31 Jul 2014 20:42:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Fri, 1 Aug 2014 02:11:56 +0530 From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Subject: [PATCH] Check if DEBUG is defined in regex_internal.h Message-ID: <20140731204156.GN16739@spoyarek.pnq.redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.22.1-rc1 (2013-10-16) Hi, The DEBUG macro is checked for its value in one place and if it is defined in another. Make this consistent across the two cases and use the same style that we did in mktime.c, which is to check if the macro is defined and it is set. Siddhesh * posix/regex_internal.c: Check if DEBUG is defined and is set. diff --git a/posix/regex_internal.c b/posix/regex_internal.c index 7eebf46..86c04a8 100644 --- a/posix/regex_internal.c +++ b/posix/regex_internal.c @@ -679,7 +679,7 @@ re_string_reconstruct (re_string_t *pstr, int 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, int idx, int eflags) int wc_idx = idx; while(input->wcs[wc_idx] == WEOF) { -#ifdef DEBUG +#if defined DEBUG && DEBUG /* It must not happen. */ assert (wc_idx >= 0); #endif