summaryrefslogtreecommitdiffstats
path: root/sys/scsi
diff options
context:
space:
mode:
authordufault <dufault@FreeBSD.org>1995-03-06 15:02:13 +0000
committerdufault <dufault@FreeBSD.org>1995-03-06 15:02:13 +0000
commitac962b633947f7f26b8c2636573815edd510e359 (patch)
tree29859811ced06984ac952c38aff3c2725845b633 /sys/scsi
parent6bf76974911d42645b28f27a4c4af468f7498e80 (diff)
downloadFreeBSD-src-ac962b633947f7f26b8c2636573815edd510e359.zip
FreeBSD-src-ac962b633947f7f26b8c2636573815edd510e359.tar.gz
Submitted by: bde@zeta.org.au (Bruce Evans)
Fix it so that calls to extend_get won't dereference 0 when "swap on sd.." calls sdsize() on systems with no SCSI devices. This probably really fixes Poul's "boot with no SCSI" problem.
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/scsiconf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 9a998ba..ca1a9b6 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -16,7 +16,7 @@
*
* New configuration setup: dufault@hda.com
*
- * $Id: scsiconf.c,v 1.20 1995/03/01 22:24:43 dufault Exp $
+ * $Id: scsiconf.c,v 1.21 1995/03/04 20:50:58 dufault Exp $
*/
#include <sys/types.h>
@@ -100,8 +100,8 @@ void *extend_set(struct extend_array *ea, int index, void *value)
void *extend_get(struct extend_array *ea, int index)
{
- if (index >= ea->nelem || index < 0)
- return 0;
+ if (ea == NULL || index >= ea->nelem || index < 0)
+ return NULL;
return ea->ps[index];
}
OpenPOWER on IntegriCloud