mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-29 16:44:03 +00:00
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.
This commit is contained in:
parent
f7ae0afb88
commit
558b7c23d1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6936
@ -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];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user