The branch main has been updated by glebius:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=29c3350f395a48b5c6fe8acd28f281e9af9cd8ab

commit 29c3350f395a48b5c6fe8acd28f281e9af9cd8ab
Author:     Gleb Smirnoff <[email protected]>
AuthorDate: 2026-01-27 18:02:46 +0000
Commit:     Gleb Smirnoff <[email protected]>
CommitDate: 2026-01-27 18:02:46 +0000

    ipfw: fix my stupid error in casting void * to enum
    
    Fixes:  349fcf079ca32d5c93e45366d2b27638747affeb
---
 sys/netpfil/ipfw/ip_fw_iface.c | 8 ++++----
 1 file 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;

Reply via email to