From: Dave Jones <davej@codemonkey.org.uk>
To: Larry McVoy <lm@work.bitmover.com>,
Christoph Hellwig <hch@infradead.org>,
Chris Heath <chris@heathens.co.nz>,
linux-kernel@vger.kernel.org
Subject: Re: coding style (was Re: [PATCH][2.5] UTF-8 support in console)
Date: Sat, 31 May 2003 16:01:50 +0100 [thread overview]
Message-ID: <20030531150150.GA14829@suse.de> (raw)
In-Reply-To: <20030531144323.GA22810@work.bitmover.com>
On Sat, May 31, 2003 at 07:43:23AM -0700, Larry McVoy wrote:
> One other one is the
>
> if (!q) return;
>
> Chris said two lines, we don't do it that way. The coding style we use is
> a) one line is fine for a single statement.
> b) in all other cases there are curly braces
Saving a line over readability is utterly bogus.
Just look at some of the crap we have in devfs..
if (fs_info->devfsd_task == NULL) return (TRUE);
if (devfsd_queue_empty (fs_info) && fs_info->devfsd_sleeping) return TRUE;
if ( is_devfsd_or_child (fs_info) ) return (FALSE);
set_current_state (TASK_UNINTERRUPTIBLE);
add_wait_queue (&fs_info->revalidate_wait_queue, &wait);
if (!devfsd_queue_empty (fs_info) || !fs_info->devfsd_sleeping)
if (fs_info->devfsd_task) schedule ();
remove_wait_queue (&fs_info->revalidate_wait_queue, &wait);
__set_current_state (TASK_RUNNING);
return (TRUE);
*horror* to my eyes at least.
Parts of the DRI code use similar uglies. Whitespace is a *good* thing.
If you want more lines of code per screen, get a larger xterm, change a
font, whatever, but don't decrease code readability for something so bogus.
Dave
next prev parent reply other threads:[~2003-05-31 14:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-31 14:10 [PATCH][2.5] UTF-8 support in console Chris Heath
2003-05-31 14:21 ` Christoph Hellwig
2003-05-31 14:43 ` coding style (was Re: [PATCH][2.5] UTF-8 support in console) Larry McVoy
2003-05-31 15:01 ` Dave Jones [this message]
2003-05-31 15:39 ` Larry McVoy
2003-05-31 17:14 ` Steven Cole
2003-05-31 17:56 ` viro
2003-05-31 19:37 ` [PATCH][2.5] UTF-8 support in console Chris Heath
-- strict thread matches above, loose matches on Subject: below --
2003-05-31 16:06 coding style (was Re: [PATCH][2.5] UTF-8 support in console) john
2003-06-01 4:41 ` Matt Mackall
2003-06-01 5:18 ` Randy.Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030531150150.GA14829@suse.de \
--to=davej@codemonkey.org.uk \
--cc=chris@heathens.co.nz \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lm@work.bitmover.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox