From fc9fab80c6a39b7d3c66495c21ebf5bba43ad393 Mon Sep 17 00:00:00 2001 From: hselasky Date: Thu, 29 Mar 2012 15:47:29 +0000 Subject: Move tty_opened_ns() into syscons.c which is currently the only client of this macro. Suggested by: ed @ MFC after: 1 week --- sys/dev/syscons/syscons.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sys/dev/syscons') diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 9d125d8..01b1150 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -86,6 +86,9 @@ __FBSDID("$FreeBSD$"); #define KEYCODE_BS 0x0e /* "<-- Backspace" key, XXX */ +/* NULL-safe version of "tty_opened()" */ +#define tty_opened_ns(tp) ((tp) != NULL && tty_opened(tp)) + typedef struct default_attr { int std_color; /* normal hardware color */ int rev_color; /* reverse hardware color */ -- cgit v1.1