Ethereal-users: Re: [Ethereal-users] Bugs in README.developer

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

From: Guy Harris <guy@xxxxxxxxxx>
Date: Mon, 15 Jul 2002 13:29:43 -0700
On Mon, Jul 15, 2002 at 02:53:17PM +0100, Richard Urwin wrote:
> 2. The line:
> 		proto_tree_add_uint(tree, hf_PROTOABBREV_FIELDABBREV, tvb,
> offset, len, value)
>    Should read:
> 		proto_tree_add_uint(ti, hf_PROTOABBREV_FIELDABBREV, tvb,
> offset, len, value)

No, it shouldn't.

It should read

	proto_tree_add_uint(PROTOABBREV_tree, hf_PROTOABBREV_FIELDABBREV, tvb,
	    offset, len, value);

(Yes, *currently* "proto_item_add_subtree()" *happens* to return its
first argument, but that's not guaranteed to be true forever.)