Ethereal-dev: RE: [Ethereal-dev] README.developer - if (tree)

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

From: Devin Heitmueller <dheitmueller@xxxxxxxxxxx>
Date: Tue, 16 Dec 2003 23:17:27 -0000
On Tue, 2003-12-16 at 17:52, Biot Olivier wrote:
> Unless you use double parentheses, like in:
> 
> #define IF_proto_tree_add_string(tree, x) \
> if (tree) proto_tree_add_string x
> 
> You'll have to write:
> 
> IF_proto_tree_add_string(my_tree, (my_tree, hf_name,
> 		tvb, start, len, "%s = %u",
> 		s_name, index));

Ugh.  That's even more ugly than just having "if (tree)"

-- 
Devin Heitmueller
Senior Software Engineer
Netilla Networks Inc.