Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/m68k/m68k Remove bogus initializer.



details:   https://anonhg.NetBSD.org/src/rev/2876de5f645d
branches:  trunk
changeset: 554480:2876de5f645d
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Tue Oct 28 20:39:54 2003 +0000

description:
Remove bogus initializer.

diffstat:

 sys/arch/m68k/m68k/pmap_motorola.c |  25 ++++++++++---------------
 sys/arch/m68k/m68k/sig_machdep.c   |  16 ++++++++++------
 2 files changed, 20 insertions(+), 21 deletions(-)

diffs (104 lines):

diff -r fbd93f71817e -r 2876de5f645d sys/arch/m68k/m68k/pmap_motorola.c
--- a/sys/arch/m68k/m68k/pmap_motorola.c        Tue Oct 28 20:27:22 2003 +0000
+++ b/sys/arch/m68k/m68k/pmap_motorola.c        Tue Oct 28 20:39:54 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap_motorola.c,v 1.8 2003/10/27 02:03:10 cl Exp $        */
+/*     $NetBSD: pmap_motorola.c,v 1.9 2003/10/28 20:43:00 mycroft Exp $        */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -124,7 +124,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap_motorola.c,v 1.8 2003/10/27 02:03:10 cl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_motorola.c,v 1.9 2003/10/28 20:43:00 mycroft Exp $");
 
 #include "opt_compat_hpux.h"
 
@@ -1675,14 +1675,9 @@
        vaddr_t va;
        paddr_t *pap;
 {
-       boolean_t rv = FALSE;
        paddr_t pa;
        u_int pte;
 
-#ifdef DEBUG
-       pa = 0; /* XXX: gcc */
-#endif
-
        PMAP_DPRINTF(PDB_FOLLOW,
            ("pmap_extract(%p, %lx) -> ", pmap, va));
 
@@ -1692,18 +1687,18 @@
                        pa = (pte & PG_FRAME) | (va & ~PG_FRAME);
                        if (pap != NULL)
                                *pap = pa;
-                       rv = TRUE;
+#ifdef DEBUG
+                       if (pmapdebug & PDB_FOLLOW)
+                               printf("%lx\n", pa);
+#endif
+                       return (TRUE);
                }
        }
 #ifdef DEBUG
-       if (pmapdebug & PDB_FOLLOW) {
-               if (rv)
-                       printf("%lx\n", pa);
-               else
-                       printf("failed\n");
-       }
+       if (pmapdebug & PDB_FOLLOW)
+               printf("failed\n");
 #endif
-       return (rv);
+       return (FALSE);
 }
 
 /*
diff -r fbd93f71817e -r 2876de5f645d sys/arch/m68k/m68k/sig_machdep.c
--- a/sys/arch/m68k/m68k/sig_machdep.c  Tue Oct 28 20:27:22 2003 +0000
+++ b/sys/arch/m68k/m68k/sig_machdep.c  Tue Oct 28 20:39:54 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sig_machdep.c,v 1.25 2003/10/27 02:03:10 cl Exp $      */
+/*     $NetBSD: sig_machdep.c,v 1.26 2003/10/28 20:39:54 mycroft Exp $ */
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -75,7 +75,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.25 2003/10/27 02:03:10 cl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.26 2003/10/28 20:39:54 mycroft Exp $");
 
 #include "opt_compat_netbsd.h"
 
@@ -355,17 +355,21 @@
        __greg_t *gr = mcp->__gregs;
        struct frame *frame = (struct frame *)l->l_md.md_regs;
        unsigned int format = mcp->__mc_pad.__mc_frame.__mcf_format;
-       int sz = 0;     /* XXX: gcc */
+       int sz;
 
        /* Validate the supplied context */
        if (((flags & _UC_CPU) != 0 &&
-            (gr[_REG_PS] & (PSL_MBZ|PSL_IPL|PSL_S)) != 0) ||
-           ((flags & _UC_M68K_UC_USER) == 0 &&
-            (format > FMTB || (sz = exframesize[format]) < 0)))
+            (gr[_REG_PS] & (PSL_MBZ|PSL_IPL|PSL_S)) != 0))
                return (EINVAL);
 
        /* Restore exception frame information if necessary. */
        if ((flags & _UC_M68K_UC_USER) == 0 && format >= FMT4) {
+               if (format > FMTB)
+                       return (EINVAL);
+               sz = exframesize[format];
+               if (sz < 0)
+                       return (EINVAL);
+
                if (frame->f_stackadj == 0) {
                        reenter_syscall(frame, sz);
                        /* NOTREACHED */



Home | Main Index | Thread Index | Old Index