summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev/magma.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-05-22 09:28:03 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-05-22 09:28:03 +0000
commita90068960a81dddcc6fe006a6865d26c45b66e2d (patch)
tree6b41627eac61336b2a82995e008601cc9318c41f /sys/arch/sparc/dev/magma.c
parent0ff8b72edecb06bbfece1b85d73c2873d04a0eb3 (diff)
do not assume ttys or bpps exist; plunky@skate.demon.co.uk
Diffstat (limited to 'sys/arch/sparc/dev/magma.c')
-rw-r--r--sys/arch/sparc/dev/magma.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/sparc/dev/magma.c b/sys/arch/sparc/dev/magma.c
index 1330fbf9f39..4a0fc416a4c 100644
--- a/sys/arch/sparc/dev/magma.c
+++ b/sys/arch/sparc/dev/magma.c
@@ -673,9 +673,9 @@ int serviced = 0;
int s, flags;
/*
- * check the tty ports to see what needs doing
+ * check the tty ports (if any) to see what needs doing
*/
- for( port = 0 ; port < mtty->ms_nports ; port++ ) {
+ if( mtty ) for( port = 0 ; port < mtty->ms_nports ; port++ ) {
struct mtty_port *mp = &mtty->ms_port[port];
struct tty *tp = mp->mp_tty;
@@ -729,9 +729,9 @@ int s, flags;
} /* for(each mtty...) */
/*
- * check the bpp ports to see what needs doing
+ * check the bpp ports (if any) to see what needs doing
*/
- for( port = 0 ; port < mbpp->ms_nports ; port++ ) {
+ if( mbpp ) for( port = 0 ; port < mbpp->ms_nports ; port++ ) {
struct mbpp_port *mp = &mbpp->ms_port[port];
if( !ISSET(mp->mp_flags, MBPPF_OPEN) ) continue;