Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/fs/tmpfs
Matt Thomas <matt%3am-software.com@localhost> wrote:
>
> On May 7, 2011, at 5:03 PM, Christos Zoulas wrote:
>
> > Module Name: src
> > Committed By: christos
> > Date: Sun May 8 00:03:35 UTC 2011
> >
> > Modified Files:
> > src/sys/fs/tmpfs: tmpfs_vnops.c
> >
> > Log Message:
> > no c99 please.
>
> The kernel explicitly allows C99 and actually C99 is encouraged.
> So that should reverted :)
Generally - C99 is encouraged. However, I disagree that variables
should be declared in the middle of context (for a minimum scope),
unless there is a *clear* benefit. Otherwise, it makes code harder
to read, especially if code fragment is long and/or complex.
Benefits could be, e.g. use of const or limitation of the variable
scope for performance sensitive code, also avoiding of #ifdefs, etc.
In this case, I used for (int i = 0; ...) because the loop was in
the beginning of context and #ifdef DEBUG-only.
--
Mindaugas
Home |
Main Index |
Thread Index |
Old Index