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: "Ronnie Sahlberg" <rsahlber@xxxxxxxxxxxxxx>
Date: Fri, 16 Mar 2001 17:11:14 +1100
----- Original Message ----- 
From: "Guy Harris" <guy@xxxxxxxxxx>
To: "Ronnie Sahlberg" <rsahlber@xxxxxxxxxxxxxx>
Cc: <ethereal-dev@xxxxxxxxxxxx>
Sent: Friday, March 16, 2001 9:10 AM
Subject: Re: [Ethereal-dev] packet-stat.c


> > packet-stat.c was an empty skeleton file.
> > 
> > I have implemented all dissectors for version 1 of the protocol.
> 
> Checked in.
> 
> > attached is also a capture file for all procedures defined for stat v1.
> 
> That revealed a problem - "proto_tree_add_item()" was being called
> regardless of whether the "tree" argument was null, but, unlike the
> other "proto_tree_add" routines, it didn't check for a null "tree"
> argument and just return NULL if the "tree" argument is null.
> 
> I've checked in a fix to make "proto_tree_add_item()" check for a null
> "tree" argument, following the Principle Of Least Astonishment.
>

Does this mean that all  "if(tree){"
surrounding other proto_add_item()  can be removed?

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