Gilbert Ramirez wrote:
>
> There's no reason not to do #2. We started one way, and everyone
> copy & pasted code.
>
> --gilbert
>
And :
> That's my fault; one day I felt like coding like that, with some minor
> justification --- it's one less file for cpp to open. But I could care less,
> if you feel strongly about it, we can go back to the easier-to-read style.
>
> --gilbert
Ok but a small optimization at _compile_ phase is not justified (as
opposed to code reading and maintenance), at execution, it is another
story ;-)
If Guy is OK, I will do both modifications...
Another point (I don't remember who added this function, Guy or you) :
/* Look for an ether name in the hash, and return it if found.
* If it's not found, simply return NULL. We DO NOT make a new
* hash entry for it with the hex digits turned into a string.
*/
u_char *get_ether_name_if_known(const u_char *addr)
{
...
if( tp == NULL ) {
/* Hash key not found in table.
* Force a lookup (and a hash entry) for addr, then call
* myself. I plan on not getting into an infinite loop because
* eth_name_lookup() is guaranteed to make a hashtable entry,
* so when I call myself again, I can never get into this
* block of code again. Knock on wood...
*/
(void) eth_name_lookup(addr);
I do not understand the first comment since eth_name_lookup will add an
entry (either real or dummy) if not found ...
Laurent.
--
Laurent DENIEL | E-mail: deniel@xxxxxxxxxxx
Paris, FRANCE | laurent.deniel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
| WWW : http://www.worldnet.fr/~deniel
All above opinions are personal, unless stated otherwise.