summaryrefslogtreecommitdiffstats
path: root/sys/dev/pv/xen.c
diff options
context:
space:
mode:
authormikeb <mikeb@openbsd.org>2017-01-20 16:57:38 +0000
committermikeb <mikeb@openbsd.org>2017-01-20 16:57:38 +0000
commit319ac3440d66b626f938b52b6b2596b0a997e2d9 (patch)
tree6701956134f2aba6e06e3ffaf006fe9bc0e2b207 /sys/dev/pv/xen.c
parentAdd a warning when the address pool is exhausted (diff)
downloadwireguard-openbsd-319ac3440d66b626f938b52b6b2596b0a997e2d9.tar.xz
wireguard-openbsd-319ac3440d66b626f938b52b6b2596b0a997e2d9.zip
Merge two conditional expressions
Diffstat (limited to 'sys/dev/pv/xen.c')
-rw-r--r--sys/dev/pv/xen.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/pv/xen.c b/sys/dev/pv/xen.c
index dbc1d670a17..7721e2a37d9 100644
--- a/sys/dev/pv/xen.c
+++ b/sys/dev/pv/xen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xen.c,v 1.71 2017/01/10 17:16:39 reyk Exp $ */
+/* $OpenBSD: xen.c,v 1.72 2017/01/20 16:57:38 mikeb Exp $ */
/*
* Copyright (c) 2015 Mike Belopuhov
@@ -1364,9 +1364,8 @@ xen_hotplug(void *arg)
/* Detect all removed and kept devices */
LIST_FOREACH_SAFE(xdv, &xdl->dl_devs, dv_entry, xvdn) {
for (i = 0, keep = 0; i < iov_cnt; i++) {
- if (seen[i])
- continue;
- if (!strcmp(xdv->dv_unit, (char *)iovp[i].iov_base)) {
+ if (!seen[i] &&
+ !strcmp(xdv->dv_unit, (char *)iovp[i].iov_base)) {
seen[i]++;
keep++;
break;