Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/luna68k/luna68k Misc cleanup.
details: https://anonhg.NetBSD.org/src/rev/bc505a3e0073
branches: trunk
changeset: 790173:bc505a3e0073
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Mon Sep 23 17:11:22 2013 +0000
description:
Misc cleanup.
- use bool instead of int
- avoid an assignment as a value with extra parentheses
- use aprint_normal(9) for attach message
- remove parentheses from return value
diffstat:
sys/arch/luna68k/luna68k/mainbus.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (51 lines):
diff -r a514be247ab3 -r bc505a3e0073 sys/arch/luna68k/luna68k/mainbus.c
--- a/sys/arch/luna68k/luna68k/mainbus.c Mon Sep 23 17:02:18 2013 +0000
+++ b/sys/arch/luna68k/luna68k/mainbus.c Mon Sep 23 17:11:22 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mainbus.c,v 1.11 2013/09/23 17:02:18 tsutsui Exp $ */
+/* $NetBSD: mainbus.c,v 1.12 2013/09/23 17:11:22 tsutsui Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.11 2013/09/23 17:02:18 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.12 2013/09/23 17:11:22 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -67,12 +67,13 @@
static int
mainbus_match(device_t parent, cfdata_t cf, void *args)
{
- static int mainbus_matched;
+ static bool mainbus_matched;
if (mainbus_matched)
- return (0);
+ return 0;
- return ((mainbus_matched = 1));
+ mainbus_matched = true;
+ return 1;
}
static void
@@ -89,7 +90,7 @@
devs = luna_devs;
ndevs = __arraycount(luna_devs);
}
- printf("\n");
+ aprint_normal("\n");
for (i = 0; i < ndevs; i++) {
ma = devs[i];
config_found(self, &ma, mainbus_print);
@@ -104,5 +105,5 @@
if (pnp)
aprint_normal("%s at %s", ma->ma_name, pnp);
- return (UNCONF);
+ return UNCONF;
}
Home |
Main Index |
Thread Index |
Old Index