Date: Sat, 27 Sep 2008 22:10:59 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: cperciva@freebsd.org Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/dev/cfe cfe_console.c Message-ID: <20080927.221059.-108809907.imp@bsdimp.com> In-Reply-To: <48DEFFDE.5020300@freebsd.org> References: <200809280333.m8S3XABp063809@repoman.freebsd.org> <48DEFFDE.5020300@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <48DEFFDE.5020300@freebsd.org> Colin Percival <cperciva@freebsd.org> writes: : Warner Losh wrote: : > Change while (cond)\n\t\t; to while (cond)\n\t\tcontinue; since the : > former more explicitly tells the compiler that you want an empty loop. : > There are some lint programs that use this hint to avoid generating : > warnings. : : In style(9) the example : for (p = buf; *p != '\0'; ++p) : ; /* nothing */ : is given, but I really like the explicit continue; enough so that I'm : wondering if the example in style(9) should be changed to : for (p = buf; *p != '\0'; ++p) : continue; : to encourage people to write that way (I hope I'm not the only person : who simply never thought of adding the explicit continue?). : : Realizing that questions of style tend to provoke huge debates: Please : send me your opinions off-list, and I'll only make this change if the : emails I get are at least 75% in favour. I think this is a good change. I do it in my code because I got used to it when tools enforced it years ago... I like it, but I'm sure others will differ. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080927.221059.-108809907.imp>