summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMichal Mazurek <akfaew@cvs.openbsd.org>2017-05-28 15:15:22 +0000
committerMichal Mazurek <akfaew@cvs.openbsd.org>2017-05-28 15:15:22 +0000
commitb9bb40be7452ebfa1d5e1da711c5884ae6d7d2b3 (patch)
treebba43efba408502fbae5420f855b9f0c0ff172ae /sbin
parentc69af77caee846c3d9fc9b9d53cb2cbc2792de61 (diff)
Don't check np->port for NULL - it's an array, it's never NULL.
OK bluhm@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/pfctl/parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index 63aaafeeea5..f45c0980e8b 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.659 2017/05/15 11:23:25 mikeb Exp $ */
+/* $OpenBSD: parse.y,v 1.660 2017/05/28 15:15:21 akfaew Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -4596,7 +4596,7 @@ apply_redirspec(struct pf_pool *rpool, struct pf_rule *r, struct redirspec *rs,
rpool->proxy_port[0] = ntohs(rs->rdr->rport.a);
if (isrdr) {
- if (!rs->rdr->rport.b && rs->rdr->rport.t && np->port != NULL) {
+ if (!rs->rdr->rport.b && rs->rdr->rport.t) {
rpool->proxy_port[1] = ntohs(rs->rdr->rport.a) +
(ntohs(np->port[1]) - ntohs(np->port[0]));
} else