Ethereal-dev: Re: [Ethereal-dev] Bug in packet-wlancap.c?

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 5 Aug 2003 12:12:01 -0700

On Tuesday, August 5, 2003, at 11:34 AM, Stuffed Crust wrote:

A patch to fix it is attached, it's as Mr. Arnold suggested.

Checked in.

BTW, many of those "proto_tree_add" calls could be replaced with "proto_tree_add_item()" calls, which means it'll fetch the data for you and you don't have to change the function if the type changes. (The main uses for the other calls are when

1) the value put into the protocol tree isn't the value fetched from the packet, e.g. it's some function of the value fetched from the packet;

	2) you're using one of the "proto_tree_add_XXX_format" routines;

	3) you've already fetched the value for other reasons.)