Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Oct 1997 07:28:18 +0200
From:      Ollivier Robert <roberto@keltia.freenix.fr>
To:        current@FreeBSD.ORG
Subject:   Re: nullfs & current UPDATE!
Message-ID:  <19971022072818.27417@keltia.freenix.fr>
In-Reply-To: <199710220240.MAA23169@godzilla.zeta.org.au>; from Bruce Evans on Wed, Oct 22, 1997 at 12:40:50PM %2B1000
References:  <199710220240.MAA23169@godzilla.zeta.org.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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...
 
> It doesn't do nothing, especially now.

I changed the comment in the commit although I could make it clearer.
 
> It is an obfuscation to set ap->a_vp = vp above and then not use it here.
> I think the function is still simple enough for it to be clearer without
> temporary variables.  `lowervp' can be written fairly concisely as
> VTONULL(ap->a_vp)->null_lowervp.  In fact, there is already a macro
> NULLVPTOLOWERVP() for this.  It seems to be used consistently to set
> `lowervp' variables that are passed to other functions and not used again,
> as lowervp is here.

It is not used consistly in nullfs :-(
-- 
Ollivier ROBERT -=- FreeBSD: There are no limits -=- roberto@keltia.freenix.fr
FreeBSD keltia.freenix.fr 3.0-CURRENT #41: Sat Oct 18 18:47:01 CEST 1997



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