From owner-freebsd-current Sun Jan 31 22:06:02 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA27322 for freebsd-current-outgoing; Sun, 31 Jan 1999 22:05:16 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from gatekeeper.tsc.tdk.com (gatekeeper.tsc.tdk.com [207.113.159.21]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA27314 for ; Sun, 31 Jan 1999 22:05:15 -0800 (PST) (envelope-from gdonl@tsc.tdk.com) Received: from sunrise.gv.tsc.tdk.com (root@sunrise.gv.tsc.tdk.com [192.168.241.191]) by gatekeeper.tsc.tdk.com (8.8.8/8.8.8) with ESMTP id WAA27908; Sun, 31 Jan 1999 22:00:11 -0800 (PST) (envelope-from gdonl@tsc.tdk.com) Received: from salsa.gv.tsc.tdk.com (salsa.gv.tsc.tdk.com [192.168.241.194]) by sunrise.gv.tsc.tdk.com (8.8.5/8.8.5) with ESMTP id WAA09611; Sun, 31 Jan 1999 22:00:10 -0800 (PST) Received: (from gdonl@localhost) by salsa.gv.tsc.tdk.com (8.8.5/8.8.5) id WAA07742; Sun, 31 Jan 1999 22:00:09 -0800 (PST) From: Don Lewis Message-Id: <199902010600.WAA07742@salsa.gv.tsc.tdk.com> Date: Sun, 31 Jan 1999 22:00:09 -0800 In-Reply-To: Poul-Henning Kamp "Re: btokup().. patch to STYLE(9) (fwd)" (Jan 29, 9:13am) X-Mailer: Mail User's Shell (7.2.6 alpha(3) 7/19/95) To: Poul-Henning Kamp , current@FreeBSD.ORG Subject: Re: btokup().. patch to STYLE(9) (fwd) Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Jan 29, 9:13am, Poul-Henning Kamp wrote: } Subject: Re: btokup().. patch to STYLE(9) (fwd) } } On the other hand style(9) should still firmly outlaw stuff like: } } /* wait 10 ms */ } if (((error = tsleep((caddr_t)dev, PPBPRI | PCATCH, } "ppbpoll", hz/100)) != EWOULDBLOCK) != 0) { } return (error); } } The "!= 0" is obviously bogus, but what about: if ((error = tsleep((caddr_t)dev, PPBPRI | PCATCH, "ppbpoll", hz/100)) != EWOULDBLOCK) { return (error); } It would be better if the "!=" fit on the previous line. What if the expression fit on one 80 character line? BTW, something I like that I picked up from Paul Vixie's code is indenting all the arguments to a function by the same amount. Forcing an unneccesary line wrap: if ((error = tsleep((caddr_t)dev, PPBPRI | PCATCH, "ppbpoll", hz/100)) != EWOULDBLOCK) { return (error); } which isn't real clean because of the trailing "!= EWOULDBLOCK". The downside of this style is that some arguments won't fit in the available space or the argument list will occupy quite a few lines if the arguments start too far to the right. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message