diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-05-06 02:36:02 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-05-06 02:36:02 +0000 |
commit | 3b6f0d7f125dfa4d1001d602ca874bcb9e2c2f29 (patch) | |
tree | 5da2fed0b9bbe9a132d25e639ad8069031aa6554 /sys/arch/macppc | |
parent | fec38c7e58b6588e573ed2df0f3bf170d0925c83 (diff) |
Add missing braces so this will correctly fall back to the "name"
property of a node if "device_type" is not present.
ok mpi@ miod@
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r-- | sys/arch/macppc/macppc/mainbus.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/arch/macppc/macppc/mainbus.c b/sys/arch/macppc/macppc/mainbus.c index 1494ae0f062..20635df9c00 100644 --- a/sys/arch/macppc/macppc/mainbus.c +++ b/sys/arch/macppc/macppc/mainbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mainbus.c,v 1.23 2014/07/12 18:44:42 tedu Exp $ */ +/* $OpenBSD: mainbus.c,v 1.24 2015/05/06 02:36:01 jsg Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -157,13 +157,11 @@ mbattach(struct device *parent, struct device *self, void *aux) for (node = OF_child(OF_peer(0)); node; node=OF_peer(node)) { bzero (name, sizeof(name)); - if (OF_getprop(node, "device_type", name, - sizeof(name)) <= 0) { - if (OF_getprop(node, "name", name, - sizeof(name)) <= 0) - printf ("name not found on node %x\n", - node); + if (OF_getprop(node, "device_type", name, sizeof(name)) <= 0) { + if (OF_getprop(node, "name", name, sizeof(name)) <= 0) { + printf ("name not found on node %x\n", node); continue; + } } if (strcmp(name, "memory") == 0) { nca.ca_name = "mem"; |