From owner-freebsd-audit Sat Apr 28 8:36:22 2001 Delivered-To: freebsd-audit@freebsd.org Received: from green.bikeshed.org (localhost [127.0.0.1]) by hub.freebsd.org (Postfix) with ESMTP id 6FA8337B422; Sat, 28 Apr 2001 08:36:19 -0700 (PDT) (envelope-from green@green.bikeshed.org) Received: from localhost (green@localhost) by green.bikeshed.org (8.11.2/8.11.1) with ESMTP id f3SFaHJ30047; Sat, 28 Apr 2001 11:36:18 -0400 (EDT) (envelope-from green@green.bikeshed.org) Message-Id: <200104281536.f3SFaHJ30047@green.bikeshed.org> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: Bruce Evans Cc: Chris Faulhaber , Maxime Henrion , audit@FreeBSD.ORG Subject: Re: [PATCH] wall.c changes from OpenBSD In-Reply-To: Message from Bruce Evans of "Sat, 28 Apr 2001 09:03:25 +1000." From: "Brian F. Feldman" Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sat, 28 Apr 2001 11:36:16 -0400 Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Bruce Evans wrote: > On Fri, 27 Apr 2001, Chris Faulhaber wrote: > > *** wall.c.old Fri Apr 27 14:58:30 2001 > > --- wall.c Fri Apr 27 14:58:09 2001 > > *************** > > *** 225,232 **** > > } > > (void)fprintf(fp, "%79s\r\n", " "); > > > > ! if (fname && !(freopen(fname, "r", stdin))) > > ! err(1, "can't read %s", fname); > > while (fgets(lbuf, sizeof(lbuf), stdin)) > > for (cnt = 0, p = lbuf; (ch = *p) != '\0'; ++p, ++cnt) { > > if (ch == '\r') { > > --- 225,238 ---- > > } > > (void)fprintf(fp, "%79s\r\n", " "); > > > > ! if (fname) { > > ! gid_t egid = getegid(); > > Style bugs: > 1) declaration in inner block. > 2) initializer in auto declaration. Explicitly forbidden in style(9) since > it calls a function. What was the justification for disallowing usage of proper variable block scoping? -- Brian Fundakowski Feldman \ FreeBSD: The Power to Serve! / green@FreeBSD.org `------------------------------' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message