Date: Tue, 27 Jan 2026 18:03:17 +0000 From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 29c3350f395a - main - ipfw: fix my stupid error in casting void * to enum Message-ID: <6978fde5.ca30.1018f47b@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=29c3350f395a48b5c6fe8acd28f281e9af9cd8ab commit 29c3350f395a48b5c6fe8acd28f281e9af9cd8ab Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2026-01-27 18:02:46 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> 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;home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6978fde5.ca30.1018f47b>
