cvs commit: src/sys/net radix.c
darrenr at hub.freebsd.org
Wed Apr 21 16:24:45 PDT 2004
Some of these changes, for the sake of change, can be annoying when you
grab code from one BSD, start analysing it and then go looking at others
to see if they behave the same, etc.
I suppose what I'm saying here is that the more arbitrary divergence in
the code base here, the greater the difficulty in analysing the code at
some point in the future to see if it is is bug compatible with others.
A different example is that changes of this nature might make the casual
reader pickup a copy of Stevens and think the code is different, just by
virtue of the names being different, when in fact it isn't.
On Wed, Apr 21, 2004 at 08:27:36AM -0700, Luigi Rizzo wrote:
> luigi 2004/04/21 08:27:36 PDT
> FreeBSD src repository
> Modified files:
> sys/net radix.c
> Readability fixes:
> Clearly comment the assumptions on the structure of keys (addresses)
> and masks, and introduce a macro, LEN(p), to extract the size of these
> objects instead of using *(u_char *)p which might be confusing.
> Comment the confusion in the types used to pass around pointers
> to keys and masks, as a reminder to fix that at some point.
> Add a few comments on what some functions do.
> Comment a probably inefficient (but still correct) section of code
> in rn_walktree_from()
> The object code generated after this commit is the same as before.
> At some point we should also change same variable identifiers such
> as "t, tt, ttt" to fancier names such as "root, left, right" (just
> in case someone wants to understand the code!), replace misspelling
> of NULL as 0, remove 'register' declarations that make little sense
> these days.
> Revision Changes Path
> 1.36 +76 -12 src/sys/net/radix.c
More information about the cvs-src