X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=util%2Fxutil.c;h=ac496daf17f7c6f5f1dab6aabe8ff7e6dd8f4793;hp=15ff7650c3b5cc7782726c88f781ec20106baf95;hb=518d4ef7d0a45e7b9a63a377892daf9b7f2f6791;hpb=1dedfc90f6eee7cad10f1a1ceb39a7a1c4dbd1b1 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