summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2014-02-08 00:51:14 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2014-02-08 00:51:14 +0000
commit0b01f1b0cadf3240965d0de445e26f067e64be0f (patch)
treefbc8c154e16ef3e70fd0637c0b6ed82ea2a5eaef
parent1f8521e3c55a93ad74f09cfaf62965a084925c58 (diff)
only copy wmesg if wchan, after chatting with guenther and millert.
(and no need to copy empty string, it's already been zero filled.)
-rw-r--r--sys/sys/sysctl.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h
index 02317a71132..1d9657c5ff1 100644
--- a/sys/sys/sysctl.h
+++ b/sys/sys/sysctl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysctl.h,v 1.139 2013/10/22 16:40:26 guenther Exp $ */
+/* $OpenBSD: sysctl.h,v 1.140 2014/02/08 00:51:13 tedu Exp $ */
/* $NetBSD: sysctl.h,v 1.16 1996/04/09 20:55:36 cgd Exp $ */
/*
@@ -557,12 +557,9 @@ do { \
(kp)->p_holdcnt = 1; \
(kp)->p_priority = (p)->p_priority; \
(kp)->p_usrpri = (p)->p_usrpri; \
- if ((p)->p_wmesg) \
+ if ((p)->p_wchan && (p)->p_wmesg) \
copy_str((kp)->p_wmesg, (p)->p_wmesg, \
sizeof((kp)->p_wmesg)); \
- else \
- copy_str((kp)->p_wmesg, "", \
- sizeof((kp)->p_wmesg)); \
if (show_addresses) \
(kp)->p_wchan = PTRTOINT64((p)->p_wchan); \
} \