Ethereal-dev: [Ethereal-dev] tree==NULL checking?

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

From: "fabio matturro" <fabiomax3@xxxxxxxxxxx>
Date: Tue, 14 Mar 2006 20:09:50 +0100
Hi,
one question I'd like u to clear out : )

Supposing we have a piece of code like this:

if (XXX_tree) {

value = tvb_get_ntohl (tvb, offset);

g_hash_table_insert (table, key, GINT_TO_POINTER(value));

...

}


Now, if XXX_tree == NULL (that is, the user has not asked for a detailed dissection), will 'value' not be inserted into the hash table? if so, how should I avoid including the code

value = tvb_get_ntohl (tvb, offset);

g_hash_table_insert (table, key, GINT_TO_POINTER(value));

inside a control structure like 'if (XXX_tree)' ?

_________________________________________________________________
Scarica gratuitamente MSN Toolbar! http://toolbar.msn.it/