Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Apr 2001 11:36:16 -0400
From:      "Brian F. Feldman" <green@FreeBSD.ORG>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Chris Faulhaber <jedgar@fxp.org>, Maxime Henrion <mux@qualys.com>, audit@FreeBSD.ORG
Subject:   Re: [PATCH] wall.c changes from OpenBSD 
Message-ID:  <200104281536.f3SFaHJ30047@green.bikeshed.org>
In-Reply-To: Message from Bruce Evans <bde@zeta.org.au>  of "Sat, 28 Apr 2001 09:03:25 %2B1000." <Pine.BSF.4.21.0104280849140.5874-100000@besplex.bde.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
Bruce Evans <bde@zeta.org.au> 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




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