All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>
To: "Brown, Len" <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: ACPI mailing list
	<acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	juhl-lkml-poRShpWsAiE@public.gmane.org
Subject: Re: [PATCH 0/30] return statement cleanup - kill pointless parentheses (fwd)
Date: Tue, 21 Dec 2004 09:33:46 +0100	[thread overview]
Message-ID: <20041221083345.GA1012@elf.ucw.cz> (raw)
In-Reply-To: <F7DC2337C7631D4386A2DF6E8FB22B30024F6C4C-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>

Hi!

> >Parenthesis around returns statements were driving me crazy for quite
> >a long time -- return is not a function and I do not think it should
> >look as one. Could we get this applied?
> 
> K&R-2 says "Parentheses are often used around the expression, but they
> are optional."

Of course it is valid C, but return(((((-ENOMEM))))); would be valid
C, too :-). It is also bad, because it makes return look like a
function call.

I'd like to at least get rid of 

	return(a);

form.

	return (a);

is slightly less ugly.
								Pavel
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/

  parent reply	other threads:[~2004-12-21  8:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-21  4:19 [PATCH 0/30] return statement cleanup - kill pointless parentheses (fwd) Brown, Len
     [not found] ` <F7DC2337C7631D4386A2DF6E8FB22B30024F6C4C-N2PTB0HCzHKkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-12-21  7:54   ` Jesper Juhl
2004-12-21  8:33   ` Pavel Machek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-12-21 17:34 Brown, Len
2004-12-20 22:54 Pavel Machek

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=20041221083345.GA1012@elf.ucw.cz \
    --to=pavel-+zi9xunit7i@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=juhl-lkml-poRShpWsAiE@public.gmane.org \
    --cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /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.