Re: [hackers] [libsl][PATCH] die: exit: use EXIT_FAILURE intead of 1
Meh, it's just one line. usually `0` is reserved for 'success' and 1
or more designed to error codes and so on. If the system decides to
have such unusual way to handle return codes, then EXIT_* values would
be changed.
On Fri, Jul 29, 2022 at 3:19 AM Hiltjo Posthuma <hiltjo_AT_codemadness.org> wrote:
>
> On Thu, Jul 28, 2022 at 07:32:54PM -0500, explosion0mental_AT_gmail.com wrote:
> > From: explosion-mental <explosion0mental_AT_gmail.com>
> >
> > stdlib.h is included anyway.
> > ---
> > util.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/util.c b/util.c
> > index fe044fc..e03ec21 100644
> > --- a/util.c
> > +++ b/util.c
> > _AT_@ -31,5 +31,5 @@ die(const char *fmt, ...) {
> > fputc('\n', stderr);
> > }
> >
> > - exit(1);
> > + exit(EXIT_FAILURE);
> > }
> > --
> > 2.37.1
> >
> >
>
> I think either are fine.
>
> Maybe we shouldnt yak-shave too much anymore...
>
> --
> Kind regards,
> Hiltjo
>
Received on Fri Aug 05 2022 - 22:31:05 CEST
This archive was generated by hypermail 2.3.0
: Fri Aug 05 2022 - 23:00:37 CEST