From owner-freebsd-audit Sat Sep 8 17:44:45 2001 Delivered-To: freebsd-audit@freebsd.org Received: from coffee.q9media.com (coffee.q9media.com [216.94.229.19]) by hub.freebsd.org (Postfix) with ESMTP id 5C96437B40C for ; Sat, 8 Sep 2001 17:44:43 -0700 (PDT) Received: (from mike@localhost) by coffee.q9media.com (8.11.2/8.11.3) id f890lTs15795; Sat, 8 Sep 2001 20:47:29 -0400 (EDT) (envelope-from mike) Date: Sat, 8 Sep 2001 20:47:29 -0400 From: Mike Barcroft To: David Hill Cc: audit@FreeBSD.ORG Subject: Re: users.c PATCH - please review Message-ID: <20010908204729.A15754@coffee.q9media.com> Mail-Followup-To: Mike Barcroft , David Hill , audit@FreeBSD.ORG References: <20010831160414.7125e88e.david@phobia.ms> <20010901125802.F85574@coffee.q9media.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010901125802.F85574@coffee.q9media.com>; from mike@FreeBSD.ORG on Sat, Sep 01, 2001 at 12:58:02PM -0400 Organization: The FreeBSD Project Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Mike Barcroft writes: > David Hill writes: > > I have patched users/users.c so that it will compile under WARNS?=2. I have both attached and cut/pasted it to the message. > > Please review it. > > > diff -ru /usr/src/usr.bin/users.orig/users.c /usr/src/usr.bin/users/users.c > > --- /usr/src/usr.bin/users.orig/users.c Fri Aug 27 21:07:14 1999 > > +++ /usr/src/usr.bin/users/users.c Fri Aug 31 15:58:20 2001 > > @@ -117,5 +117,8 @@ > > scmp(p, q) > > const void *p, *q; > > { > > - return(strncmp((char *)p, (char *)q, UT_NAMESIZE)); > > + const char *const pp1 = p; > > + const char *const pp2 = q; > > + > > + return(strncmp(pp1, pp2, UT_NAMESIZE)); > > } > > Why create new local variables? Just get rid of the bogus casts. Committed (with casts removed instead of the new variables), thanks! Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message