git: 555726fda685 - stable/12 - pf: Fix build if INVARIANTS is not set
Kristof Provost
kp at FreeBSD.org
Sun Feb 28 16:04:05 UTC 2021
The branch stable/12 has been updated by kp:
URL: https://cgit.FreeBSD.org/src/commit/?id=555726fda685ab5be9ccdbfcb73b9336dc2d75af
commit 555726fda685ab5be9ccdbfcb73b9336dc2d75af
Author: Kristof Provost <kp at FreeBSD.org>
AuthorDate: 2018-11-02 19:23:50 +0000
Commit: Kristof Provost <kp at FreeBSD.org>
CommitDate: 2021-02-28 15:36:29 +0000
pf: Fix build if INVARIANTS is not set
r340061 included a number of assertions pf_frent_remove(), but these assertions
were the only use of the 'prev' variable. As a result builds without
INVARIANTS had an unused variable, and failed.
Reported by: vangyzen@
(cherry picked from commit 58ef854f8b05508f41aff3bdaf1564c8dd4c1d4f)
---
sys/netpfil/pf/pf_norm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c
index eb310e27b9ae..0770fcfd4c58 100644
--- a/sys/netpfil/pf/pf_norm.c
+++ b/sys/netpfil/pf/pf_norm.c
@@ -445,7 +445,9 @@ pf_frent_insert(struct pf_fragment *frag, struct pf_frent *frent,
void
pf_frent_remove(struct pf_fragment *frag, struct pf_frent *frent)
{
+#ifdef INVARIANTS
struct pf_frent *prev = TAILQ_PREV(frent, pf_fragq, fr_next);
+#endif
struct pf_frent *next = TAILQ_NEXT(frent, fr_next);
int index;
More information about the dev-commits-src-all
mailing list