aboutsummaryrefslogtreecommitdiffhomepage
path: root/util/xutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/xutil.c')
-rw-r--r--util/xutil.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/util/xutil.c b/util/xutil.c
index 15ff7650..ac496daf 100644
--- a/util/xutil.c
+++ b/util/xutil.c
@@ -99,7 +99,7 @@ xstrndup (const char *s, size_t n)
return ret;
}
-void
+int
xregcomp (regex_t *preg, const char *regex, int cflags)
{
int rerr;
@@ -110,9 +110,12 @@ xregcomp (regex_t *preg, const char *regex, int cflags)
char *error = xmalloc (error_size);
regerror (rerr, preg, error, error_size);
- INTERNAL_ERROR ("compiling regex %s: %s\n",
+ fprintf (stderr, "compiling regex %s: %s\n",
regex, error);
+ free (error);
+ return 1;
}
+ return 0;
}
int