Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 1997 08:32:38 +0200
From:      j@uriah.heep.sax.de (J Wunsch)
To:        current@FreeBSD.ORG
Subject:   Re: nullfs & current UPDATE!
Message-ID:  <19971022083238.XB35355@uriah.heep.sax.de>
In-Reply-To: <19971022072818.27417@keltia.freenix.fr>; from Ollivier Robert on Oct 22, 1997 07:28:18 %2B0200
References:  <199710220240.MAA23169@godzilla.zeta.org.au> <19971022072818.27417@keltia.freenix.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
As Ollivier Robert wrote:

> According to Bruce Evans:

> > style.9 says not to obfuscate code by initializes variables in
> > declarations.

> I tried to be consistent with the code around in null_vnops.c... Do you
> think we should change both miscfs/nullfs and miscfs/umapfs to conform to
> style(9) ? The code has been like this since 4.4BSD-lite...

We've already changed style(9) to make it less strict than it used to
be.  Function calls are forbidden (since they might cause ill
side-effects when someone tries to make the code thread-safe for SMP).
One must be cautious with macros like VTONULL() since they could
actually impose a function call (even if they don't do now, someone
might get the idea to change a low-level interface later, and hide it
inside such a macro).

Of course, for C++ code, the restriction needs to be rethought.
There's often a big difference between an initializer, and a
declaration followed by an assignment, in C++ (the declaration might
be not useful without the initializer, depending on your
constructors).

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19971022083238.XB35355>