From 5359fb47a459c1c88c7e7cb5390ff84513cb868e Mon Sep 17 00:00:00 2001 From: krw Date: Wed, 3 Aug 2016 16:27:25 +0000 Subject: [PATCH] A couple of "a->blah == a->blah" -> "a->blah == b->blah". Spotted by the Echelon team with AppChecker static analyzer. ok sashan@ --- sbin/pfctl/pfctl_optimize.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbin/pfctl/pfctl_optimize.c b/sbin/pfctl/pfctl_optimize.c index 9522dbf784a..a1b19781756 100644 --- a/sbin/pfctl/pfctl_optimize.c +++ b/sbin/pfctl/pfctl_optimize.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_optimize.c,v 1.35 2015/01/21 21:50:33 deraadt Exp $ */ +/* $OpenBSD: pfctl_optimize.c,v 1.36 2016/08/03 16:27:25 krw Exp $ */ /* * Copyright (c) 2004 Mike Frantzen @@ -1075,7 +1075,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); @@ -1147,7 +1147,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); -- 2.20.1