All of lore.kernel.org
 help / color / mirror / Atom feed
From: "J . A . Magallon" <jamagallon@able.es>
To: Tigran Aivazian <tigran@veritas.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [OT] style-curiosity
Date: Fri, 2 Mar 2001 15:31:17 +0100	[thread overview]
Message-ID: <20010302153117.A2690@werewolf.able.es> (raw)
In-Reply-To: <20010302120712.C4416@werewolf.able.es> <Pine.LNX.4.21.0103021223160.1338-100000@penguin.homenet>
In-Reply-To: <Pine.LNX.4.21.0103021223160.1338-100000@penguin.homenet>; from tigran@veritas.com on Fri, Mar 02, 2001 at 13:24:20 +0100


On 03.02 Tigran Aivazian wrote:
> On Fri, 2 Mar 2001, J . A . Magallon wrote:
> > for (c = misc_list.next; c != &misc_list; c = c->next)
> > {
> > 	if (c->minor == misc->minor) {
> > 		up(&misc_sem);
> > 		return -EBUSY;
> > 	}	
> > }
> 
> the above is good but the below is better:
> 
> for (c = misc_list.next; c != &misc_list; c = c->next)
>        if (c->minor == misc->minor) {
>                up(&misc_sem);
>                return -EBUSY;
>        }
>

I have suffered so many bugs coming from bad grouping that I always put
the braces even if they are not needed.

-- 
J.A. Magallon                                                      $> cd pub
mailto:jamagallon@able.es                                          $> more beer

Linux werewolf 2.4.2-ac8 #2 SMP Fri Mar 2 12:12:45 CET 2001 i686


      parent reply	other threads:[~2001-03-02 14:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.21.0103021010570.1338-100000@penguin.homenet>
2001-03-02 10:55 ` [patch-2.4.2-ac8] misc_register() fix (was Re: Linux 2.4.2ac8 Tigran Aivazian
2001-03-02 11:03   ` Philipp Rumpf
2001-03-02 11:07   ` [OT] style-curiosity J . A . Magallon
     [not found]     ` <Pine.LNX.4.21.0103021223160.1338-100000@penguin.homenet>
2001-03-02 14:31       ` J . A . Magallon [this message]

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=20010302153117.A2690@werewolf.able.es \
    --to=jamagallon@able.es \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tigran@veritas.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.