diff options
author | Michal Mazurek <akfaew@cvs.openbsd.org> | 2017-05-28 15:15:22 +0000 |
---|---|---|
committer | Michal Mazurek <akfaew@cvs.openbsd.org> | 2017-05-28 15:15:22 +0000 |
commit | b9bb40be7452ebfa1d5e1da711c5884ae6d7d2b3 (patch) | |
tree | bba43efba408502fbae5420f855b9f0c0ff172ae /sbin | |
parent | c69af77caee846c3d9fc9b9d53cb2cbc2792de61 (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.y | 4 |
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 |