summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_disk.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2020-03-13 09:30:22 +0000
committermpi <mpi@openbsd.org>2020-03-13 09:30:22 +0000
commite2640419470b888475adbf1b215d67e44dc4349a (patch)
tree1de457a93b06d990b26790cb81313986bc04d6e2 /sys/kern/subr_disk.c
parentRename "sigacts" flag field to avoid conflict with the "process" one. (diff)
downloadwireguard-openbsd-e2640419470b888475adbf1b215d67e44dc4349a.tar.xz
wireguard-openbsd-e2640419470b888475adbf1b215d67e44dc4349a.zip
Simplify logic, the "netboot" interface is always related to `bootdv'.
Logic is hard, so keep only one of two logically equivalent statements. CID 271085 ok kettenis@, deraadt@, miod@
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r--sys/kern/subr_disk.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 0bfac3eb431..b676e74a71b 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_disk.c,v 1.235 2019/12/26 22:38:00 kn Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.236 2020/03/13 09:30:22 mpi Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
@@ -1610,9 +1610,7 @@ gotswap:
panic("root device (%s) not found", buf);
}
- if (rootdv && rootdv == bootdv && rootdv->dv_class == DV_IFNET)
- ifp = ifunit(rootdv->dv_xname);
- else if (bootdv && bootdv->dv_class == DV_IFNET)
+ if (bootdv != NULL && bootdv->dv_class == DV_IFNET)
ifp = ifunit(bootdv->dv_xname);
if (ifp)