Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Ethereal-dev: Re: [Ethereal-dev] packet-stat.c

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Thu, 15 Mar 2001 22:18:03 -0800
On Fri, Mar 16, 2001 at 05:11:14PM +1100, Ronnie Sahlberg wrote:
> Does this mean that all  "if(tree){"
> surrounding other proto_add_item()  can be removed?

It means they can be removed; whether they *should* be removed is
another matter.  There *might* be a slight performance improvement from
not making the procedure call if "tree" is null; on the other hand,
there might be a slight performance improvement from making various
routines that call "proto_tree_add_item()" smaller.

> if so, I can produce a set of patches that removes the "if(tree){"
> from the packet-*.c files.

I wouldn't bother going through all the "packet-*.c" files removing
them; however, if you've added some, go ahead and remove them.