Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/pmax/pmax Initiailise to bootinfo pointer to NULL. ...



details:   https://anonhg.NetBSD.org/src/rev/9f52e0562900
branches:  trunk
changeset: 467415:9f52e0562900
user:      simonb <simonb%NetBSD.org@localhost>
date:      Wed Mar 24 12:59:15 1999 +0000

description:
Initiailise to bootinfo pointer to NULL.  In lookup_bootinfo(), if the
bootinfo pointer is NULL, just return instead of trying to make use of it.

diffstat:

 sys/arch/pmax/pmax/machdep.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r 51b681476c24 -r 9f52e0562900 sys/arch/pmax/pmax/machdep.c
--- a/sys/arch/pmax/pmax/machdep.c      Wed Mar 24 12:42:47 1999 +0000
+++ b/sys/arch/pmax/pmax/machdep.c      Wed Mar 24 12:59:15 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.128 1999/03/24 05:51:09 mrg Exp $        */
+/*     $NetBSD: machdep.c,v 1.129 1999/03/24 12:59:15 simonb Exp $     */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -43,7 +43,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.128 1999/03/24 05:51:09 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.129 1999/03/24 12:59:15 simonb Exp $");
 
 /* from: Utah Hdr: machdep.c 1.63 91/04/24 */
 
@@ -151,7 +151,7 @@
 char   machine_arch[] = MACHINE_ARCH;  /* from <machine/param.h> */
 char   cpu_model[40];   
 
-char   *bootinfo;                      /* pointer to bootinfo structure */
+char   *bootinfo = NULL;               /* pointer to bootinfo structure */
 
 /*  maps for VM objects */
 
@@ -699,7 +699,11 @@
        int type;
 {
        struct btinfo_common *bt;
-       char *help = (char *)bootinfo;
+       char *help = bootinfo;
+
+       /* Check for a bootinfo record first. */
+       if (help == NULL)
+               return (NULL);
 
        do {
                bt = (struct btinfo_common *)help;



Home | Main Index | Thread Index | Old Index