Jeff Morriss indicated the following and I obliged:

Actually I suppose what was meant is more about whether tp->name[0] is the NULL character (that is, that the name is empty).

But since the result of the lookup is already there in 'found' the whole condition can probably be taken out.


svn path=/trunk/; revision=43701
This commit is contained in:
Chris Maynard 2012-07-13 21:20:00 +00:00
parent ba376235da
commit ff63dcfa8e
1 changed files with 3 additions and 6 deletions

View File

@ -3022,13 +3022,10 @@ add_ether_byip(const guint ip, const guint8 *eth)
return;
tp = host_lookup(ip, &found);
if (tp == NULL)
return;
/* ok, we can add this entry in the ethers hashtable */
if (found)
if (found) {
/* ok, we can add this entry in the ethers hashtable */
add_eth_name(eth, tp->name);
}
} /* add_ether_byip */