diff options
| author | 1998-05-22 09:28:02 +0000 | |
|---|---|---|
| committer | 1998-05-22 09:28:02 +0000 | |
| commit | ade398023a1b01d7f4547e4e2592621267d59210 (patch) | |
| tree | 0ec60138f4e5b297dfb89806e05e4479a319ebfd /sys/arch/sparc/dev/magma.c | |
| parent | magma in both these (diff) | |
| download | wireguard-openbsd-ade398023a1b01d7f4547e4e2592621267d59210.tar.xz wireguard-openbsd-ade398023a1b01d7f4547e4e2592621267d59210.zip | |
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.c | 8 |
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; |
