summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_diskqueue.c
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>1998-12-03 14:58:24 +0000
committeroster <oster@NetBSD.org>1998-12-03 14:58:24 +0000
commit679de7e878a80d6fd9c10d8bcb3b475a721d5174 (patch)
treec41631b785298ea7779314e1456ba167543f19b9 /sys/dev/raidframe/rf_diskqueue.c
parentba90b4b2d3eee1fa0a70dc0fbf7cb346e9a95521 (diff)
Fix (potential) referencing of null pointer in (verbose) debugging mode.
Diffstat (limited to 'sys/dev/raidframe/rf_diskqueue.c')
-rw-r--r--sys/dev/raidframe/rf_diskqueue.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/raidframe/rf_diskqueue.c b/sys/dev/raidframe/rf_diskqueue.c
index 0d7c34f1ef2..65a6a3d6086 100644
--- a/sys/dev/raidframe/rf_diskqueue.c
+++ b/sys/dev/raidframe/rf_diskqueue.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_diskqueue.c,v 1.1 1998/11/13 04:20:29 oster Exp $ */
+/* $NetBSD: rf_diskqueue.c,v 1.2 1998/12/03 14:58:24 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -768,7 +768,11 @@ void rf_DiskIOComplete(queue, req, status)
Dprintf3("DiskIOComplete: a pri %d locking req was pending at r %d c %d\n",req->priority,queue->row, queue->col);
} else {
req = (queue->qPtr->Dequeue)( queue->qHdr );
- Dprintf3("DiskIOComplete: extracting pri %d req from queue at r %d c %d\n",req->priority,queue->row, queue->col);
+ if (req != NULL) {
+ Dprintf3("DiskIOComplete: extracting pri %d req from queue at r %d c %d\n",req->priority,queue->row, queue->col);
+ } else {
+ Dprintf1("DiskIOComplete: no more requests to extract.\n","");
+ }
}
if (req) {
queue->queueLength--; /* decrement count of number of requests waiting in this queue */