Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jul 2002 10:27:05 +0200
From:      Thomas Quinot <thomas@cuivre.fr.eu.org>
To:        Alfred Perlstein <bright@mu.org>
Cc:        Thomas Quinot <thomas@cuivre.fr.eu.org>, bde@freebsd.org, audit@freebsd.org
Subject:   Re: trpt cleanup
Message-ID:  <20020712102705.A55925@melusine.cuivre.fr.eu.org>
In-Reply-To: <20020712080608.GI97638@elvis.mu.org>; from bright@mu.org on Fri, Jul 12, 2002 at 01:06:08AM -0700
References:  <20020711224521.GD97638@elvis.mu.org> <20020712100010.B50744@melusine.cuivre.fr.eu.org> <20020712080608.GI97638@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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