search for: e3af651

Displaying 2 results from an estimated 2 matches for "e3af651".

2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...!= 0) { - fprintf (stderr, "pthread_join: %s\n", strerror (r)); - exit (EXIT_FAILURE); - } + if (r != 0) + error (EXIT_FAILURE, r, "pthread_join"); close (fds[0]); close (fds[1]); diff --git a/tests/c-api/tests-main.c b/tests/c-api/tests-main.c index dd5c2b6..e3af651 100644 --- a/tests/c-api/tests-main.c +++ b/tests/c-api/tests-main.c @@ -345,11 +345,9 @@ match_re (const char *str, const char *pattern) int vec[30], r; re = pcre_compile (pattern, 0, &err, &offset, NULL); - if (re == NULL) { - fprintf (stderr, "tests: cannot compile regul...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did: if (something_bad) { perror (...); exit (EXIT_FAILURE); } replace this with use of the error(3) function: if (something_bad) error (EXIT_FAILURE, errno, ...); The error(3) function is supplied by glibc, or by gnulib on platforms which don't have it, and is much more flexible than perror(3). Since we already use error(3), there seems to be