From owner-cvs-all@FreeBSD.ORG Wed Apr 21 08:27:37 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C4B6316A4CE; Wed, 21 Apr 2004 08:27:37 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C23F543D3F; Wed, 21 Apr 2004 08:27:37 -0700 (PDT) (envelope-from luigi@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i3LFRbGe088246; Wed, 21 Apr 2004 08:27:37 -0700 (PDT) (envelope-from luigi@repoman.freebsd.org) Received: (from luigi@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i3LFRabS088245; Wed, 21 Apr 2004 08:27:36 -0700 (PDT) (envelope-from luigi) Message-Id: <200404211527.i3LFRabS088245@repoman.freebsd.org> From: Luigi Rizzo Date: Wed, 21 Apr 2004 08:27:36 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/net radix.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Apr 2004 15:27:37 -0000 luigi 2004/04/21 08:27:36 PDT FreeBSD src repository Modified files: sys/net radix.c Log: 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