From owner-freebsd-audit Fri Jul 12 1:27:11 2002 Delivered-To: freebsd-audit@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A08F637B400; Fri, 12 Jul 2002 01:27:07 -0700 (PDT) Received: from melusine.cuivre.fr.eu.org (melusine.cuivre.fr.eu.org [62.212.105.185]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D49443E42; Fri, 12 Jul 2002 01:27:07 -0700 (PDT) (envelope-from thomas@cuivre.fr.eu.org) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id 60D3E2C3D4; Fri, 12 Jul 2002 10:27:05 +0200 (CEST) Date: Fri, 12 Jul 2002 10:27:05 +0200 From: Thomas Quinot To: Alfred Perlstein Cc: Thomas Quinot , bde@freebsd.org, audit@freebsd.org Subject: Re: trpt cleanup Message-ID: <20020712102705.A55925@melusine.cuivre.fr.eu.org> Reply-To: thomas@cuivre.fr.eu.org References: <20020711224521.GD97638@elvis.mu.org> <20020712100010.B50744@melusine.cuivre.fr.eu.org> <20020712080608.GI97638@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <20020712080608.GI97638@elvis.mu.org>; from bright@mu.org on Fri, Jul 12, 2002 at 01:06:08AM -0700 X-message-flag: WARNING! Using Outlook can damage your computer. Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Le 2002-07-12, Alfred Perlstein écrivait : > Any suggestions for a workaround? I'd keep the existing declaration: struct nlist nl[] = { #define N_TCP_DEBUG 0 { "_tcp_debug" }, #define N_TCP_DEBX 1 { "_tcp_debx" }, { "" }, }; which allows the addition of other symbols, should any be needed, to be a purely local change. If you'd like to eliminate the need to have a #define in addition to the initializer for each element, I'd suggest the definition of a function that looks up an entry by name (in which case we probably want to specify that names must be sorted, to allow the search to be dichotomic). Also, while we're at it: even though the implementation allows the last element to be denoted by an empty string, the man page for nlist states that the last element is defined by the name being NULL. Thomas. -- Thomas.Quinot@Cuivre.FR.EU.ORG To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message