summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2019-01-23 22:39:47 +0000
committertedu <tedu@openbsd.org>2019-01-23 22:39:47 +0000
commit20189ee30a752f2b4e51678c08712238717e52ba (patch)
treee8cc9ac77ae9009acc8e2c78490bfd13c2c47d7b
parentmachdep.apmwarn and machdep.apmhalt were removed in 2017 (diff)
downloadwireguard-openbsd-20189ee30a752f2b4e51678c08712238717e52ba.tar.xz
wireguard-openbsd-20189ee30a752f2b4e51678c08712238717e52ba.zip
eliminate a ?: in witness mtx initializer by pushing the default one
level up. ok guenther mpi visa
-rw-r--r--sys/kern/kern_exit.c4
-rw-r--r--sys/sys/mutex.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 7d38cc93870..918ea4dc1bd 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_exit.c,v 1.172 2019/01/06 12:59:45 visa Exp $ */
+/* $OpenBSD: kern_exit.c,v 1.173 2019/01/23 22:39:47 tedu Exp $ */
/* $NetBSD: kern_exit.c,v 1.39 1996/04/22 01:38:25 christos Exp $ */
/*
@@ -352,7 +352,7 @@ exit1(struct proc *p, int rv, int flags)
* proclist. We use the p_hash member to linkup to deadproc.
*/
struct mutex deadproc_mutex =
- MUTEX_INITIALIZER_FLAGS(IPL_NONE, NULL, MTX_NOWITNESS);
+ MUTEX_INITIALIZER_FLAGS(IPL_NONE, "deadproc", MTX_NOWITNESS);
struct proclist deadproc = LIST_HEAD_INITIALIZER(deadproc);
/*
diff --git a/sys/sys/mutex.h b/sys/sys/mutex.h
index 39706e0e9f8..c926647cac0 100644
--- a/sys/sys/mutex.h
+++ b/sys/sys/mutex.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mutex.h,v 1.15 2018/06/08 15:38:15 guenther Exp $ */
+/* $OpenBSD: mutex.h,v 1.16 2019/01/23 22:39:47 tedu Exp $ */
/*
* Copyright (c) 2004 Artur Grabowski <art@openbsd.org>
@@ -105,14 +105,14 @@ void __mtx_init(struct mutex *, int);
#define MTX_LO_INITIALIZER(name, flags) \
{ .lo_type = &(const struct lock_type){ .lt_name = __MTX_NAME }, \
- .lo_name = (name) != NULL ? (name) : __MTX_NAME, \
+ .lo_name = (name), \
.lo_flags = MTX_LO_FLAGS(flags) }
#define MTX_NOWITNESS 0x01
#define MTX_DUPOK 0x02
#define MUTEX_INITIALIZER(ipl) \
- MUTEX_INITIALIZER_FLAGS(ipl, NULL, 0)
+ MUTEX_INITIALIZER_FLAGS(ipl, __MTX_NAME, 0)
/*
* Some architectures need to do magic for the ipl, so they need a macro.