aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-01-19 21:14:10 -0800
committerGuy Harris <gharris@sonic.net>2021-01-19 21:14:10 -0800
commit887cacd12c45ac83234ef6b717539232231e5341 (patch)
treeae16d72d26f7ca917fed594b7eaafcb97a3bc441
parent64f1d09ef332511e3caf17fb5943c404c55df5fd (diff)
Don't check whether eth_name_lookup() returned a null pointer.
It never returns a null pointer. (At least some compilers support decorating function declarations with indications that they never return a null pointer; hopefully at least some of them attempt to validate that claim, and report at least a warning, if not an error, if they can't. We should look at decorating functions in that fashion.) This should squelch a nullPointerRedundantCheck warning from cppcheck.
-rw-r--r--epan/addr_resolv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c
index 14933af03a..e3f203ac32 100644
--- a/epan/addr_resolv.c
+++ b/epan/addr_resolv.c
@@ -3312,9 +3312,9 @@ get_ether_name_if_known(const guint8 *addr)
if (!gbl_resolv_flags.mac_name)
return NULL;
- /* eth_name_lookup will create a (resolved) hash entry if it doesn't exist */
+ /* eth_name_lookup will create a (resolved) hash entry
+ * if it doesn't exist, so it never returns NULL */
tp = eth_name_lookup(addr, TRUE);
- g_assert(tp != NULL);
if (tp->status == HASHETHER_STATUS_RESOLVED_NAME) {
/* Name is from an ethers file */