From 24393537a7a84c9daaee72da95b99be9447d7de4 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 20 Dec 2016 10:57:51 +0100 Subject: [PATCH] maint: RE_ICASE, RE_NO_SUB: remove useless '#ifdef's * sed/regexp.c (compile_regex_1): Remove #ifdef RE_ICASE guard, since dfa.c uses it unconditionally. Suggested by Norihiro Tanaka. Also remove the nearby "#ifdef RE_NO_SUB". Those macros are guaranteed to be defined by virtue of configure-time tests that ensure we're using either a new-enough native glibc (RE_NO_SUB was added in 2004), or the included replacement. --- sed/regexp.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sed/regexp.c b/sed/regexp.c index 1ea8188..ff898a8 100644 --- a/sed/regexp.c +++ b/sed/regexp.c @@ -92,15 +92,11 @@ compile_regex_1 (struct regex *new_regex, int needed_sub) break; } -#ifdef RE_ICASE if (new_regex->flags & REG_ICASE) syntax |= RE_ICASE; else -#endif new_regex->pattern.fastmap = malloc (1 << (sizeof (char) * 8)); -#ifdef RE_NO_SUB syntax |= needed_sub ? 0 : RE_NO_SUB; -#endif /* If REG_NEWLINE is set, newlines are treated differently. */ if (new_regex->flags & REG_NEWLINE) -- 2.8.0-rc2