From a90068960a81dddcc6fe006a6865d26c45b66e2d Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Fri, 22 May 1998 09:28:03 +0000 Subject: do not assume ttys or bpps exist; plunky@skate.demon.co.uk --- sys/arch/sparc/dev/magma.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/arch') 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; -- cgit v1.2.3