diff options
author | 2011-04-23 21:23:52 +0000 | |
---|---|---|
committer | 2011-04-23 21:23:52 +0000 | |
commit | edecfb5630a0ee8e02c5ceffeeab3a29a24a0ef1 (patch) | |
tree | 0e89451c005ce7f7ee6224f16f278e2fde7f6f5c | |
parent | Move assignment of kl_hub_widget[] outside a #ifdef DEBUG ... #endif block, (diff) | |
download | wireguard-openbsd-edecfb5630a0ee8e02c5ceffeeab3a29a24a0ef1.tar.xz wireguard-openbsd-edecfb5630a0ee8e02c5ceffeeab3a29a24a0ef1.zip |
Do not set kl_hub_widget[] default value more than once. Found the hard way
by deraadt@.
-rw-r--r-- | sys/arch/sgi/sgi/sginode.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/arch/sgi/sgi/sginode.c b/sys/arch/sgi/sgi/sginode.c index 95bfbb9058a..d0d849b47fb 100644 --- a/sys/arch/sgi/sgi/sginode.c +++ b/sys/arch/sgi/sgi/sginode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sginode.c,v 1.27 2011/04/23 19:52:36 miod Exp $ */ +/* $OpenBSD: sginode.c,v 1.28 2011/04/23 21:23:52 miod Exp $ */ /* * Copyright (c) 2008, 2009, 2011 Miodrag Vallat. * @@ -156,7 +156,8 @@ kl_first_pass_board(lboard_t *boardinfo, void *arg) * interrupt widget is hardwired to #a (which is another facet * of the bridge). */ - kl_hub_widget[boardinfo->brd_nasid] = 0x0a; + if (kl_hub_widget[boardinfo->brd_nasid] == 0) + kl_hub_widget[boardinfo->brd_nasid] = 0x0a; kl_scan_board(boardinfo, KLSTRUCT_ANY, kl_first_pass_comp, arg); |