search for: 1706499

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

Did you mean: 106499
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...- if (r) { - fprintf (stderr, "set_verbose not false\n"); - exit (EXIT_FAILURE); - } + if (r) + error (EXIT_FAILURE, 0, "set_verbose not false"); guestfs_close (g); diff --git a/tests/c-api/test-create-handle.c b/tests/c-api/test-create-handle.c index d2bfbbf..1706499 100644 --- a/tests/c-api/test-create-handle.c +++ b/tests/c-api/test-create-handle.c @@ -22,6 +22,8 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <errno.h> +#include <error.h> #include "guestfs.h" #include "guestfs-inter...
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