diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-11-21 22:55:44 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-11-21 22:55:44 +0000 |
commit | 644ba69eeacedf4be0a88cb8e9353d26a4331e2c (patch) | |
tree | a4c5712d4f24e6c823364a5b9a8c75b853631327 /sys/dev | |
parent | a33dd447f118713fcca5e90cd880340e2733f3b6 (diff) |
Do not dare dereferencing NULL pointers if OSIOP_DEBUG.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/osiop.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/ic/osiop.c b/sys/dev/ic/osiop.c index 2eb18f4d003..dc4938838f8 100644 --- a/sys/dev/ic/osiop.c +++ b/sys/dev/ic/osiop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: osiop.c,v 1.24 2005/04/27 21:34:18 miod Exp $ */ +/* $OpenBSD: osiop.c,v 1.25 2005/11/21 22:55:43 miod Exp $ */ /* $NetBSD: osiop.c,v 1.9 2002/04/05 18:27:54 bouyer Exp $ */ /* @@ -546,11 +546,14 @@ osiop_sched(sc) if ((sc->sc_nexus != NULL) || TAILQ_EMPTY(&sc->ready_list)) { #ifdef OSIOP_DEBUG if (osiop_debug & DEBUG_SCHED) - printf("%s: osiop_sched- nexus %p/%d ready %p/%d\n", + printf("%s: osiop_sched->nexus %p/%d ready %p/%d\n", sc->sc_dev.dv_xname, sc->sc_nexus, - sc->sc_nexus->xs->sc_link->target, + sc->sc_nexus != NULL ? + sc->sc_nexus->xs->sc_link->target : 0, TAILQ_FIRST(&sc->ready_list), - TAILQ_FIRST(&sc->ready_list)->xs->sc_link->target); + TAILQ_FIRST(&sc->ready_list) != NULL ? + TAILQ_FIRST(&sc->ready_list)->xs->sc_link->target : + 0); #endif return; } |