summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbriggs <briggs@openbsd.org>1996-10-21 01:50:45 +0000
committerbriggs <briggs@openbsd.org>1996-10-21 01:50:45 +0000
commitac11545b178d18b4edc5a157d7fb1b1361af68ab (patch)
treec747890a00ed85239070fe8523088dfb3cf95ffb
parentbetter error message if unable to create password temp file. (diff)
downloadwireguard-openbsd-ac11545b178d18b4edc5a157d7fb1b1361af68ab.tar.xz
wireguard-openbsd-ac11545b178d18b4edc5a157d7fb1b1361af68ab.zip
Fix two bugs noticed by Taras Ivanenko <ivanenko@ctpa03.mit.edu>
via.c: don't allow spl to remain at splhigh on error. mainbus.c: Make sure that variable is initialized.
-rw-r--r--sys/arch/mac68k/mac68k/mainbus.c2
-rw-r--r--sys/arch/mac68k/mac68k/via.c7
2 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/mac68k/mac68k/mainbus.c b/sys/arch/mac68k/mac68k/mainbus.c
index db26ed01ede..21851d676c6 100644
--- a/sys/arch/mac68k/mac68k/mainbus.c
+++ b/sys/arch/mac68k/mac68k/mainbus.c
@@ -217,7 +217,7 @@ char *
bus_mapin(bustype, paddr, sz)
int bustype, paddr, sz;
{
- int off, pa, pmt;
+ int off, pa, pmt = 0;
vm_offset_t va, retval;
if (bustype != BUS_NUBUS)
diff --git a/sys/arch/mac68k/mac68k/via.c b/sys/arch/mac68k/mac68k/via.c
index 87eb12e41c6..fc26a7d517c 100644
--- a/sys/arch/mac68k/mac68k/via.c
+++ b/sys/arch/mac68k/mac68k/via.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: via.c,v 1.8 1996/06/23 15:43:22 briggs Exp $ */
+/* $OpenBSD: via.c,v 1.9 1996/10/21 01:50:45 briggs Exp $ */
/* $NetBSD: via.c,v 1.48 1996/06/21 06:12:45 scottr Exp $ */
/*-
@@ -289,7 +289,7 @@ add_nubus_intr(slot, func, client_data)
void (*func) __P((void *, int));
void *client_data;
{
- int s = splhigh();
+ int s;
/*
* Map Nubus slot 0 to "slot" 15; see note on Nubus slot
@@ -300,6 +300,8 @@ add_nubus_intr(slot, func, client_data)
if (slot < 9 || slot > 15)
return 0;
+ s = splhigh();
+
slotitab[slot-9] = func;
slotptab[slot-9] = client_data;
@@ -313,6 +315,7 @@ add_nubus_intr(slot, func, client_data)
/* enable_nubus_intr(); */
splx(s);
+
return 1;
}