Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Nov 2008 20:16:32 -0600 (CST)
From:      "Sean C. Farley" <scf@FreeBSD.org>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r185362 - head/share/man/man9
Message-ID:  <alpine.BSF.2.00.0811302005460.1578@baba.farley.org>
In-Reply-To: <200811270842.mAR8gwi3080974@svn.freebsd.org>
References:  <200811270842.mAR8gwi3080974@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 27 Nov 2008, Robert Watson wrote:

> Log:
>  Revert r184509: don't encourage the use of sysexits.h with err() and
>  errx(),, as there seems to be a general preference against this
>  practice.

*snip*

> 	if ((four = malloc(sizeof(struct foo))) == NULL)
> -		err(EX_OSERR, NULL);
> +		err(1, (char *)NULL);
> 	if ((six = (int *)overflow()) == NULL)
> -		errx(EX_DATAERR, "number overflowed");
> +		errx(1, "number overflowed");

Out of curiosity, why not EXIT_FAILURE instead of 1, at least in
situations where including stdlib.h is allowed?  Is it because
EXIT_FAILURE is only required to be non-zero and not necessarily 1?

Sean
-- 
scf@FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0811302005460.1578>