Displaying 3 results from an estimated 3 matches for "something_bad".
Did you mean:
something_a
2016 Apr 04
1
Re: [PATCH 2/2] Use 'error' function for fprintf followed by exit.
On Monday 04 April 2016 13:28:51 Richard W.M. Jones wrote:
> Like with the previous commit, this replaces instances of:
>
> if (something_bad) {
> fprintf (stderr, "%s: error message\n", guestfs_int_program_name);
> exit (EXIT_FAILURE);
> }
>
> with:
>
> if (something_bad)
> error (EXIT_FAILURE, 0, "error message");
>
> (except in a few cases were errno was incorrectly...
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). S...
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
Like with the previous commit, this replaces instances of:
if (something_bad) {
fprintf (stderr, "%s: error message\n", guestfs_int_program_name);
exit (EXIT_FAILURE);
}
with:
if (something_bad)
error (EXIT_FAILURE, 0, "error message");
(except in a few cases were errno was incorrectly being ignored, in
which case I have fixed that)....