aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2026-01-27 18:02:46 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2026-01-27 18:02:46 +0000
commit29c3350f395a48b5c6fe8acd28f281e9af9cd8ab (patch)
treeab7d20c61ef4cc86668b192cde37ffa18af17fa3
parentd8a78048a24662dc9310bfd4e4498d278fe00f0a (diff)
ipfw: fix my stupid error in casting void * to enum
-rw-r--r--sys/netpfil/ipfw/ip_fw_iface.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netpfil/ipfw/ip_fw_iface.c b/sys/netpfil/ipfw/ip_fw_iface.c
index 731587adef21..332a90f1844a 100644
--- a/sys/netpfil/ipfw/ip_fw_iface.c
+++ b/sys/netpfil/ipfw/ip_fw_iface.c
@@ -95,12 +95,12 @@ enum ifevent { ARRIVAL, DEPARTURE, RENAME };
static void
ipfw_kifhandler(void *arg, struct ifnet *ifp, const char *old_name)
{
- enum ifevent *what = arg;
+ enum ifevent what = (uintptr_t)arg;
struct ip_fw_chain *ch;
struct ipfw_iface *iif;
struct namedobj_instance *ii;
- MPASS(*what != RENAME || old_name != NULL);
+ MPASS(what != RENAME || old_name != NULL);
if (V_ipfw_vnet_ready == 0)
return;
@@ -114,9 +114,9 @@ ipfw_kifhandler(void *arg, struct ifnet *ifp, const char *old_name)
return;
}
iif = (struct ipfw_iface*)ipfw_objhash_lookup_name(ii, 0,
- *what == RENAME ? old_name : if_name(ifp));
+ what == RENAME ? old_name : if_name(ifp));
if (iif != NULL) {
- switch (*what) {
+ switch (what) {
case ARRIVAL:
handle_ifattach(ch, iif, ifp->if_index);
break;