git: 2d74fed5be52 - main - ipfilter: Compat and simplify DTrace macro definitions

From: Cy Schubert <cy_at_FreeBSD.org>
Date: Sat, 04 Dec 2021 14:34:34 UTC
The branch main has been updated by cy:

URL: https://cgit.FreeBSD.org/src/commit/?id=2d74fed5be523370345af10fdccd0b4fc8baa53e

commit 2d74fed5be523370345af10fdccd0b4fc8baa53e
Author:     Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2021-10-05 04:13:47 +0000
Commit:     Cy Schubert <cy@FreeBSD.org>
CommitDate: 2021-12-04 14:33:12 +0000

    ipfilter: Compat and simplify DTrace macro definitions
    
    Use a compound #if to simplify and compact DTn DTRACE_PROBEn macros
    used by ipfilter.
    
    MFC after:      3 days
---
 sys/contrib/ipfilter/netinet/ip_compat.h | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/sys/contrib/ipfilter/netinet/ip_compat.h b/sys/contrib/ipfilter/netinet/ip_compat.h
index 5c00f8d37e40..4c7c9af9badf 100644
--- a/sys/contrib/ipfilter/netinet/ip_compat.h
+++ b/sys/contrib/ipfilter/netinet/ip_compat.h
@@ -1221,8 +1221,7 @@ typedef	struct	tcpiphdr	tcpiphdr_t;
 # define	DPRINT(x)
 #endif
 
-#ifdef DTRACE_PROBE
-# ifdef _KERNEL
+#if defined(DTRACE_PROBE) && defined(_KERNEL)
 #  define	DT(_n)			DTRACE_PROBE(_n)
 #  define	DT1(_n,_a,_b)		DTRACE_PROBE1(_n,_a,_b)
 #  define	DT2(_n,_a,_b,_c,_d)	DTRACE_PROBE2(_n,_a,_b,_c,_d)
@@ -1230,13 +1229,6 @@ typedef	struct	tcpiphdr	tcpiphdr_t;
 					DTRACE_PROBE3(_n,_a,_b,_c,_d,_e,_f)
 #  define	DT4(_n,_a,_b,_c,_d,_e,_f,_g,_h) \
 				DTRACE_PROBE4(_n,_a,_b,_c,_d,_e,_f,_g,_h)
-# else
-#  define	DT(_n)
-#  define	DT1(_n,_a,_b)
-#  define	DT2(_n,_a,_b,_c,_d)
-#  define	DT3(_n,_a,_b,_c,_d,_e,_f)
-#  define	DT4(_n,_a,_b,_c,_d,_e,_f,_g,_h)
-# endif
 #else
 # define	DT(_n)
 # define	DT1(_n,_a,_b)