From 16146790545965f1a32b276e9074044ac0dd3a54 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 11 May 2019 06:23:09 +0000 Subject: Accept empty regexes --- src/skaembutils/s6-grep.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/skaembutils/s6-grep.c b/src/skaembutils/s6-grep.c index 2839758..d990e5b 100644 --- a/src/skaembutils/s6-grep.c +++ b/src/skaembutils/s6-grep.c @@ -4,6 +4,8 @@ #include #include #include + +#include #include #include #include @@ -67,7 +69,7 @@ int main (int argc, char const *const *argv) size_t arglen = strlen(argv[0]) ; if (!flags.fixed) { - int e = regcomp(&re, argv[0], REG_NOSUB | (flags.extended ? REG_EXTENDED : 0) | (flags.ignorecase ? REG_ICASE : 0)) ; + int e = skalibs_regcomp(&re, argv[0], REG_NOSUB | (flags.extended ? REG_EXTENDED : 0) | (flags.ignorecase ? REG_ICASE : 0)) ; if (e) { char buf[256] ; -- cgit 1.4.1