search for: 612b86e

Displaying 2 results from an estimated 2 matches for "612b86e".

Did you mean: 612864
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
..."); - exit (EXIT_FAILURE); - } + if (g == NULL) + error (EXIT_FAILURE, errno, "guestfs_create"); r = guestfs_add_drive_opts (g, "/dev/null", -1); if (r == -1) diff --git a/tests/c-api/test-add-libvirt-dom.c b/tests/c-api/test-add-libvirt-dom.c index 566a3de..612b86e 100644 --- a/tests/c-api/test-add-libvirt-dom.c +++ b/tests/c-api/test-add-libvirt-dom.c @@ -84,17 +84,13 @@ main (int argc, char *argv[]) /* Create the guestfs handle. */ g = guestfs_create (); - if (g == NULL) { - fprintf (stderr, "failed to create handle\n"); - exit (EXI...
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