Author: pfg Date: Sat Jan 27 22:57:01 2018 New Revision: 328497 URL: https://svnweb.freebsd.org/changeset/base/328497
Log: pfctl(8): Fix two wrong conditions. Caught by gcc80's -Wtautological-compare option. MFC after: 5 days Approved by: kp Obtained from: DragonFlyBSD (git e3cdbf6c) Differential Revision: https://reviews.freebsd.org/D14083 Modified: head/sbin/pfctl/pfctl_optimize.c Modified: head/sbin/pfctl/pfctl_optimize.c ============================================================================== --- head/sbin/pfctl/pfctl_optimize.c Sat Jan 27 22:53:29 2018 (r328496) +++ head/sbin/pfctl/pfctl_optimize.c Sat Jan 27 22:57:01 2018 (r328497) @@ -1092,7 +1092,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); @@ -1164,7 +1164,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); _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"