Re: svn commit: r237286 - head/lib/libc/gen

2012-06-20 Thread Bruce Evans
On Wed, 20 Jun 2012, Xin Li wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 06/20/12 14:23, Colin Percival wrote: On 06/20/12 14:15, Warner Losh wrote: On Jun 20, 2012, at 10:36 AM, Colin Percival wrote: On 06/20/12 09:27, Bruce Evans wrote: On Wed, 20 Jun 2012, Eitan Adler wrote:

Re: svn commit: r237286 - head/lib/libc/gen

2012-06-20 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 06/20/12 14:23, Colin Percival wrote: > On 06/20/12 14:15, Warner Losh wrote: >> On Jun 20, 2012, at 10:36 AM, Colin Percival wrote: >>> On 06/20/12 09:27, Bruce Evans wrote: On Wed, 20 Jun 2012, Eitan Adler wrote: > Log: Don't close an u

Re: svn commit: r237286 - head/lib/libc/gen

2012-06-20 Thread Colin Percival
On 06/20/12 14:15, Warner Losh wrote: > On Jun 20, 2012, at 10:36 AM, Colin Percival wrote: >> On 06/20/12 09:27, Bruce Evans wrote: >>> On Wed, 20 Jun 2012, Eitan Adler wrote: Log: Don't close an uninitialized descriptor. [1] Add a sanity check for the validity of the passed fd. >>>

Re: svn commit: r237286 - head/lib/libc/gen

2012-06-20 Thread Warner Losh
On Jun 20, 2012, at 10:36 AM, Colin Percival wrote: > On 06/20/12 09:27, Bruce Evans wrote: >> On Wed, 20 Jun 2012, Eitan Adler wrote: >>> Log: >>> Don't close an uninitialized descriptor. [1] >>> Add a sanity check for the validity of the passed fd. >> >> Library functions shouldn't use assert(

Re: svn commit: r237286 - head/lib/libc/gen

2012-06-20 Thread Colin Percival
On 06/20/12 09:27, Bruce Evans wrote: > On Wed, 20 Jun 2012, Eitan Adler wrote: >> Log: >> Don't close an uninitialized descriptor. [1] >> Add a sanity check for the validity of the passed fd. > > Library functions shouldn't use assert() or abort(). Why not? > The fd is not passed, but is a st

Re: svn commit: r237286 - head/lib/libc/gen

2012-06-20 Thread Bruce Evans
On Wed, 20 Jun 2012, Eitan Adler wrote: Log: Don't close an uninitialized descriptor. [1] Add a sanity check for the validity of the passed fd. Library functions shouldn't use assert() or abort(). The fd is not passed, but is a static variable under syslog()'s control. In libc, only the fo