diff options
author | 2019-11-27 17:18:24 +0000 | |
---|---|---|
committer | 2019-11-27 17:18:24 +0000 | |
commit | 60b5b2040bf2d25520e885a8b8c8c143c3d05591 (patch) | |
tree | f807c248135b512878fe792063604b68dfbafe13 | |
parent | Add regress tests for making syscalls from the main program text and from (diff) | |
download | wireguard-openbsd-60b5b2040bf2d25520e885a8b8c8c143c3d05591.tar.xz wireguard-openbsd-60b5b2040bf2d25520e885a8b8c8c143c3d05591.zip |
swap some comparisons
-rw-r--r-- | usr.sbin/rpki-client/as.c | 8 | ||||
-rw-r--r-- | usr.sbin/rpki-client/ip.c | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/rpki-client/as.c b/usr.sbin/rpki-client/as.c index 2f0b39fce98..4377873ccd1 100644 --- a/usr.sbin/rpki-client/as.c +++ b/usr.sbin/rpki-client/as.c @@ -1,4 +1,4 @@ -/* $OpenBSD: as.c,v 1.4 2019/06/19 16:30:36 deraadt Exp $ */ +/* $OpenBSD: as.c,v 1.5 2019/11/27 17:18:24 deraadt Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -151,11 +151,11 @@ as_check_covered(uint32_t min, uint32_t max, uint32_t amin, amax; for (i = 0; i < asz; i++) { - if (CERT_AS_INHERIT == as[i].type) + if (as[i].type == CERT_AS_INHERIT) return 0; - amin = CERT_AS_RANGE == as[i].type ? + amin = as[i].type == CERT_AS_RANGE ? as[i].range.min : as[i].id; - amax = CERT_AS_RANGE == as[i].type ? + amax = as[i].type == CERT_AS_RANGE? as[i].range.max : as[i].id; if (min >= amin && max <= amax) return 1; diff --git a/usr.sbin/rpki-client/ip.c b/usr.sbin/rpki-client/ip.c index 3f35b8b27b6..611be6d6226 100644 --- a/usr.sbin/rpki-client/ip.c +++ b/usr.sbin/rpki-client/ip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip.c,v 1.8 2019/10/03 07:55:34 claudio Exp $ */ +/* $OpenBSD: ip.c,v 1.9 2019/11/27 17:18:24 deraadt Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -110,7 +110,7 @@ int ip_addr_check_overlap(const struct cert_ip *ip, const char *fn, const struct cert_ip *ips, size_t ipsz) { - size_t i, sz = AFI_IPV4 == ip->afi ? 4 : 16; + size_t i, sz = ip->afi == AFI_IPV4 ? 4 : 16; int inherit_v4 = 0, inherit_v6 = 0; int has_v4 = 0, has_v6 = 0, socktype; char buf[64]; |