bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH,HURD] hurd: compliance fixes for getgroups


From: Pedro Alves
Subject: Re: [PATCH,HURD] hurd: compliance fixes for getgroups
Date: Sat, 28 Apr 2012 16:17:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

On 04/28/2012 12:21 PM, Pino Toscano wrote:

> Alle venerdì 27 aprile 2012, Roland McGrath ha scritto:
>>> > > 2012-04-27  Pino Toscano  <toscano.pino@tiscali.it>
>>> > > 
>>> > >         * sysdeps/mach/hurd/getgroups.c (__getgroups): Return -1 and set
>>> > >         EINVAL for negative `n' or less than `ngids'.
>> > 
>> > The norm is to use all caps and no quotes to mention local variable
>> > names.  You can also drop the (function) when it's the only function
>> > in the file of the same name.
> Ah ok, fixed patch attached.
> Where can I read about these two change log style settings (i.e. 
> variables as all caps, and no (function) when it's the only one in a 
> file)? I don't remember them in the official pages[1], so maybe I missed 
> some documentation...
> [1] http://www.gnu.org/prep/standards/html_node/Change-Logs.html

Pedantically, the norm is to use all caps when talking about
the _value_ of a variable, as opposed to the variable itself,
as in:

"less than NGIDS."

instead of

"less than the value of the `ngids' variable."

See <http://www.gnu.org/prep/standards/standards.html#Comments> :

> The comment on a function is much clearer if you use the argument names to 
> speak about the
> argument values. The variable name itself should be lower case, but write it 
> in
> upper case when you are speaking about the value rather than the variable 
> itself.
> Thus, “the inode number NODE_NUM” rather than “an inode”.

-- 
Pedro Alves



reply via email to

[Prev in Thread] Current Thread [Next in Thread]