about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2019-05-11 06:23:09 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2019-05-11 06:23:09 +0000
commit16146790545965f1a32b276e9074044ac0dd3a54 (patch)
tree45a19bfe795bb47f0c627089cc393d3722c86847 /src
parent9e064f1da7921319c342f121602c61a9f3f7a0ec (diff)
downloads6-portable-utils-16146790545965f1a32b276e9074044ac0dd3a54.tar.gz
s6-portable-utils-16146790545965f1a32b276e9074044ac0dd3a54.tar.xz
s6-portable-utils-16146790545965f1a32b276e9074044ac0dd3a54.zip
Accept empty regexes
Diffstat (limited to 'src')
-rw-r--r--src/skaembutils/s6-grep.c4
1 files changed, 3 insertions, 1 deletions
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 <errno.h>
 #include <regex.h>
 #include <string.h>
+
+#include <skalibs/posixplz.h>
 #include <skalibs/bytestr.h>
 #include <skalibs/sgetopt.h>
 #include <skalibs/buffer.h>
@@ -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] ;