All regcomp callers are now going through xregcomp.
---
toys/pending/man.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
From 5f529744b49842ba0903b0c2f54df8bbe0a505f3 Mon Sep 17 00:00:00 2001
From: Elliott Hughes <[email protected]>
Date: Mon, 29 Jul 2019 22:37:36 -0700
Subject: [PATCH] man: switch to xregcomp.
All regcomp callers are now going through xregcomp.
---
toys/pending/man.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/toys/pending/man.c b/toys/pending/man.c
index 1d3487d0..7063df09 100644
--- a/toys/pending/man.c
+++ b/toys/pending/man.c
@@ -175,7 +175,8 @@ void man_main(void)
char *d, *f;
DIR *dp;
struct dirent *entry;
- if (regcomp(&TT.reg, TT.k, REG_ICASE|REG_NOSUB)) error_exit("bad regex");
+
+ xregcomp(&TT.reg, TT.k, REG_ICASE|REG_NOSUB);
while (!manpath()) {
d = xmprintf("%s/man%s", TT.m, *TT.sct);
if (!(dp = opendir(d))) continue;
--
2.22.0.709.g102302147b-goog
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net