aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-07-29 22:37:36 -0700
committerRob Landley <rob@landley.net>2019-07-31 11:03:53 -0500
commit65ac89cd4605ba01a6154c903fd54e2f9f7e6147 (patch)
tree4c4568ae01b0bb53f538b3d52591c3bfec1bf41f /toys
parent6b617d8073600c9f2518c87addc49a89a27d887e (diff)
downloadtoybox-65ac89cd4605ba01a6154c903fd54e2f9f7e6147.tar.gz
man: switch to xregcomp.
All regcomp callers are now going through xregcomp.
Diffstat (limited to 'toys')
-rw-r--r--toys/pending/man.c3
1 files changed, 2 insertions, 1 deletions
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;