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: "Andreas Sikkema" <andreas.sikkema@xxxxxxxxxxxx>
Date: Wed, 17 Dec 2003 09:01:51 +0100
On , ethereal-dev-bounces@xxxxxxxxxxxx wrote:

> How about this -- can we replace the function
> proto_tree_add_X() with a
> macro that checks to see if the first argument is non-null? This
> would eliminate the need for the developer to add the "if (tree)"
> before every call.  We would get the benefits of not having to do
> the stack loading, but also not have to clutter the code with the
> if statements. 

The problem with macro's is IMHO, that they can be used to obfuscate 
some really key points of the code, for instance, here it is the 
if (tree) {} thing. I think that's bad.

Macro's have their use, but not to hide design decisions ;-)

-- 
Andreas Sikkema