From owner-cvs-all Fri May 1 00:36:26 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id AAA14213 for cvs-all-outgoing; Fri, 1 May 1998 00:36:26 -0700 (PDT) (envelope-from owner-cvs-all@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id AAA14197; Fri, 1 May 1998 00:36:17 -0700 (PDT) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id RAA09278; Fri, 1 May 1998 17:31:07 +1000 Date: Fri, 1 May 1998 17:31:07 +1000 From: Bruce Evans Message-Id: <199805010731.RAA09278@godzilla.zeta.org.au> To: bde@zeta.org.au, brian@Awfulhak.org Subject: Re: cvs commit: src/lib/libc/gen syslog.c Cc: brian@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-lib@FreeBSD.ORG Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk >> > 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 It didn't test for a return of 0 from connect: connected = connect(LogFile, (struct sockaddr *)&SyslogAddr, sizeof(SyslogAddr)) != -1; This tests for a return of -1 from connect() and assigns the result of the test to `connected'. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message