git: 9dd2698fe6b8 - stable/12 - ipfilter: Compat and simplify DTrace macro definitions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 09 Dec 2021 19:00:17 UTC
The branch stable/12 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=9dd2698fe6b8229cce602173a650f111696ab1b8 commit 9dd2698fe6b8229cce602173a650f111696ab1b8 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:52:10 +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)