httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <stri...@apache.org>
Subject Minor(?) style questions
Date Mon, 11 Mar 2002 10:55:07 GMT
Hi,

Just checking if people have given this some thought before.
And, maybe if there was something decided on this matter.  For
instance, that this is free when it comes to style rules.

As some of you have noticed I am doing style reviews of/
corrections on the current httpd codebase, which has the nice
sideeffect of getting us some basic code review aswell.  With
everything in a consistent style, review by other parties will
be easier aswell.  Not to mention that one can probably read
the code quicker...

So, just a few simple questions:

1) Can we decide on a standard style when it comes to using
   ++ or --?

   Example:

   lines++;

   vs.

   ++lines;

   We are currently mixing this in the current code base.
   I personally favor the first.  And unless we are testing
   the variable in an expression, pre- or postfix doesn't
   matter for the resulting binary, only for readability.


2) How should a do {} while look like?

   do {
       ...
   } while (...);

   or

   do {
       ...
   }
   while (...);


3) What is the preferred method of doing an infinite loop?

   while (1) {
       ...
   }

   or

   for (;;) {
       ...
   }


Thanks,

Sander


Mime
View raw message