diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2004-02-16 04:57:51 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2004-02-16 04:57:51 +0000 |
commit | 3269941684fcaec2f07f118b9663454dd4e33a4c (patch) | |
tree | 53a5142ca5d82c955b18e4b8b0d0520a5905b22c /sys/arch | |
parent | f3b89538791485a03eea70f41654c1b641212f7a (diff) |
Fix the recently added OF_getnodebyname(), if 0 is passed in for start
that indicates that start should be assigned OF_peer(0) "head of device tree",
not node which is then overwritten.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/macppc/macppc/openfirm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/macppc/macppc/openfirm.c b/sys/arch/macppc/macppc/openfirm.c index 6e57de3f794..770a08eab74 100644 --- a/sys/arch/macppc/macppc/openfirm.c +++ b/sys/arch/macppc/macppc/openfirm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openfirm.c,v 1.7 2004/01/11 16:22:30 drahn Exp $ */ +/* $OpenBSD: openfirm.c,v 1.8 2004/02/16 04:57:50 drahn Exp $ */ /* $NetBSD: openfirm.c,v 1.1 1996/09/30 16:34:52 ws Exp $ */ /* @@ -271,8 +271,8 @@ OF_getnodebyname(int start, const char *name) int node = 0; int next; - if (node == 0) - node = OF_peer(0); + if (start == 0) + start = OF_peer(0); for (node = start; node; node = next) { len = OF_getprop(node, "name", nname, sizeof(nname)); |