From owner-cvs-all Thu Mar 7 3:30:54 2002 Delivered-To: cvs-all@freebsd.org Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id D1F9C37B41A; Thu, 7 Mar 2002 03:30:38 -0800 (PST) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.11.6/8.11.6) with UUCP id g27BUco51854; Thu, 7 Mar 2002 11:30:38 GMT (envelope-from mark@grimreaper.grondar.za) Received: from grimreaper (localhost [127.0.0.1]) by grimreaper.grondar.org (8.12.2/8.12.2) with ESMTP id g27BR2RV009394; Thu, 7 Mar 2002 11:27:03 GMT (envelope-from mark@grimreaper.grondar.za) Message-Id: <200203071127.g27BR2RV009394@grimreaper.grondar.org> To: obrien@FreeBSD.org Cc: Mark Murray , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/rwall rwall.c References: <20020307030244.B63484@dragon.nuxi.com> In-Reply-To: <20020307030244.B63484@dragon.nuxi.com> ; from "David O'Brien" "Thu, 07 Mar 2002 03:02:44 PST." Date: Thu, 07 Mar 2002 11:27:02 +0000 From: Mark Murray Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > On Mon, Mar 04, 2002 at 12:27:38PM -0800, Mark Murray wrote: > > markm 2002/03/04 12:27:38 PST > > > > Modified files: > > usr.bin/rwall rwall.c > > Log: > > ANSIfication, WARNS and lint cleanup. > > - (void)snprintf(tmpname, sizeof(tmpname), "%s/wall.XXXXXX", _PATH_TMP); > + snprintf(tmpname, sizeof(tmpname), "%s/wall.XXXXXX", _PATH_TMP); > > lint(1) does not like our usage of (void)? Removing it where it already > exists goes against the examples in style(9). "Useless cast". I'm also somewhat tired of (bad?) examples in style.9 getting promoted to hard-and-fast rules. Style 9 is a _guide_. The examples even more so. > - if ((fd = mkstemp(tmpname)) == -1 || !(fp = fdopen(fd, "r+"))) > + fd = mkstemp(tmpname); > + fp = fdopen(fd, "r+"); > + if (fd == -1 || !fp) > > Why did you need to do such code restructuring? "Assignment statement in conditional". I also happens to be more readable. M -- o Mark Murray \_ O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message