diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-12-04 10:59:34 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-12-04 10:59:34 +0000 |
commit | f0b9d12b6a46e47bba5db8baeb24453396efac9d (patch) | |
tree | bf784482d59a9572d596b1c1177beb842447717d /tap-protohierstat.c | |
parent | e83aeb6431bc4f1577146e806c5c61a2e7c799a4 (diff) |
Don't use GNodes for the protocol tree, put the sibling pointer, and
pointers to the first *and* last child, in the "proto_node" structure
itself. That saves us one level of indirection and memory allocation,
and lets us append to a tree by appending to the last child directly,
rather than having to scan through the list of siblings of the first
child to find the end of that list.
svn path=/trunk/; revision=9171
Diffstat (limited to 'tap-protohierstat.c')
-rw-r--r-- | tap-protohierstat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tap-protohierstat.c b/tap-protohierstat.c index dfe6481705..532ebcc343 100644 --- a/tap-protohierstat.c +++ b/tap-protohierstat.c @@ -1,7 +1,7 @@ /* tap-protohierstat.c * protohierstat 2002 Ronnie Sahlberg * - * $Id: tap-protohierstat.c,v 1.5 2003/12/03 09:28:19 guy Exp $ + * $Id: tap-protohierstat.c,v 1.6 2003/12/04 10:59:33 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -84,11 +84,11 @@ protohierstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, void *d if(!edt->tree){ return 0; } - if(!edt->tree->children){ + if(!edt->tree->first_child){ return 0; } - for(tree=edt->tree->children;tree;tree=tree->next){ + for(tree=edt->tree->first_child;tree;tree=tree->next){ fi=PITEM_FINFO(tree); /* first time we saw a protocol at this leaf */ |