summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64/dev
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2018-12-27 11:04:42 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2018-12-27 11:04:42 +0000
commitd3d33287e66e771e3282805ef05d554ed587e685 (patch)
treec5356138a2fe37fe08e1ef8c58eacc94957d96ef /sys/arch/sparc64/dev
parent8961b20ee45dd1494b01829865792916e2909d39 (diff)
Do not assign node to itself. Instead move the earlier initialisation into
the for loop. Makes clang happier. OK otto@, deraadt@
Diffstat (limited to 'sys/arch/sparc64/dev')
-rw-r--r--sys/arch/sparc64/dev/pci_machdep.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arch/sparc64/dev/pci_machdep.c b/sys/arch/sparc64/dev/pci_machdep.c
index b1f4422a785..3fe438f121a 100644
--- a/sys/arch/sparc64/dev/pci_machdep.c
+++ b/sys/arch/sparc64/dev/pci_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.c,v 1.45 2017/09/08 05:36:52 deraadt Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.46 2018/12/27 11:04:41 claudio Exp $ */
/* $NetBSD: pci_machdep.c,v 1.22 2001/07/20 00:07:13 eeh Exp $ */
/*
@@ -125,13 +125,12 @@ pci_make_tag(pc, b, d, f)
*/
tag = PCITAG_CREATE(-1, b, d, f);
- node = pc->rootnode;
/*
* Traverse all peers until we find the node or we find
* the right bridge.
*/
- for (node = ((node)); node; node = OF_peer(node)) {
+ for (node = pc->rootnode; node; node = OF_peer(node)) {
#ifdef DEBUG
if (sparc_pci_debug & SPDB_PROBE) {