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



On May 14, 12:00pm, rmind%netbsd.org@localhost (Mindaugas Rasiukevicius) wrote:
-- Subject: Re: CVS commit: src/sys/fs/tmpfs

| Benefit is code readability.  It is easier to track the variables when
| they are defined and initialised in the beginning of context.
| 
| If code is longer and/or complex - it likely has loops or conditional
| statements, and variables can be defined in the beginning of *their*
| context (basically, after { bracket).  This is very encouraged.
| 
| For other cases, compilers do a good job anyway (if you do not believe
| me - check with objdump) and there is no need to hurt code readability.  

This whole discussion misses the point. The reason I changed the
code back to regular c from c99 is because the code did not compile.
This happened because rump did not pass -std=gnu99 in the compiler
flags. Now I did 'for (size_t i = 0;' in sys/crypto and the regression
tests failed. If we are going to be compiling the kernel in c99
mode, then I suggest that we do the same for userland instead of
turning it on for userland piecemeal.

christos


Home | Main Index | Thread Index | Old Index