git: b993b91b05f1 - stable/13 - ipfilter: Compat and simplify DTrace macro definitions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Dec 2021 18:58:55 UTC
The branch stable/13 has been updated by cy:
URL: https://cgit.FreeBSD.org/src/commit/?id=b993b91b05f1f27d1a22705ea45cfb6f15f5997b
commit b993b91b05f1f27d1a22705ea45cfb6f15f5997b
Author: Cy Schubert <cy@FreeBSD.org>
AuthorDate: 2021-10-05 04:13:47 +0000
Commit: Cy Schubert <cy@FreeBSD.org>
CommitDate: 2021-12-09 18:50:21 +0000
ipfilter: Compat and simplify DTrace macro definitions
Use a compound #if to simplify and compact DTn DTRACE_PROBEn macros
used by ipfilter.
(cherry picked from commit 2d74fed5be523370345af10fdccd0b4fc8baa53e)
---
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)