Date: Fri, 01 May 1998 08:06:35 +0100 From: Brian Somers <brian@Awfulhak.org> To: Bruce Evans <bde@zeta.org.au> Cc: brian@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-lib@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/gen syslog.c Message-ID: <199805010706.IAA13082@awfulhak.org> In-Reply-To: Your message of "Fri, 01 May 1998 13:17:29 %2B1000." <199805010317.NAA29322@godzilla.zeta.org.au>
next in thread | previous in thread | raw e-mail | index | archive | help
> > Modified files: > > lib/libc/gen syslog.c > > Log: > > connect() returns -1 on error - not 0. > > Strangely enough, the code already tested for connect() returning -1 > on error. -1/other is converted to the boolean variable `connected'. > The change seems to amount to an obfuscation if this variable (`true' > changed from 1 to 0 and `false' changed from 0 to -1). I'm not sure I follow. Surely the old code would never normally open /dev/log as it tested for a return of 0 from connect(). Also, if someone does an openlog() after closing STDIN_FILENO, they'll attach STDIN_FILENO to /var/run/log and attempt to open /dev/log (getting a new descriptor and using that if they succeed). > Bruce > -- Brian <brian@Awfulhak.org>, <brian@FreeBSD.org>, <brian@OpenBSD.org> <http://www.Awfulhak.org> Don't _EVER_ lose your sense of humour.... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199805010706.IAA13082>