MFC r328497:

pfctl(8): Fix two wrong conditions.

Caught by gcc80's -Wtautological-compare option.

MFC after:	5 days
Reviewed by:	kp
Obtained from:	DragonFlyBSD (git e3cdbf6c)
This commit is contained in:
Pedro F. Giffuni 2018-02-01 02:00:36 +00:00
parent 0aa4fdbd3a
commit c31768c1d2
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=328649

View File

@ -1091,7 +1091,7 @@ skip_cmp_dst_addr(struct pf_rule *a, struct pf_rule *b)
return (0);
case PF_ADDR_DYNIFTL:
if (strcmp(a->dst.addr.v.ifname, b->dst.addr.v.ifname) != 0 ||
a->dst.addr.iflags != a->dst.addr.iflags ||
a->dst.addr.iflags != b->dst.addr.iflags ||
memcmp(&a->dst.addr.v.a.mask, &b->dst.addr.v.a.mask,
sizeof(a->dst.addr.v.a.mask)))
return (1);
@ -1163,7 +1163,7 @@ skip_cmp_src_addr(struct pf_rule *a, struct pf_rule *b)
return (0);
case PF_ADDR_DYNIFTL:
if (strcmp(a->src.addr.v.ifname, b->src.addr.v.ifname) != 0 ||
a->src.addr.iflags != a->src.addr.iflags ||
a->src.addr.iflags != b->src.addr.iflags ||
memcmp(&a->src.addr.v.a.mask, &b->src.addr.v.a.mask,
sizeof(a->src.addr.v.a.mask)))
return (1);