From f17753593c3ba9fb7226c8026ec2c748f4be658f Mon Sep 17 00:00:00 2001 From: Masao Uebayashi Date: Mon, 21 Jul 2014 17:25:48 +0000 Subject: boot(9): Reduce annoying style diffs - Always use either: ((x & RB_XXX) != 0) or ((x & RB_XXX) == 0) in boolean context (mostly if (x), or x ? y : z) - prom_halt() in alpha is confirmed to take int as boolean Converted by coccinelle. No functional change intended. --- sys/arch/hppa/hppa/machdep.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/arch/hppa') diff --git a/sys/arch/hppa/hppa/machdep.c b/sys/arch/hppa/hppa/machdep.c index 0a149c0283b..a9bc5cb41e7 100644 --- a/sys/arch/hppa/hppa/machdep.c +++ b/sys/arch/hppa/hppa/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.231 2014/07/13 22:53:38 uebayasi Exp $ */ +/* $OpenBSD: machdep.c,v 1.232 2014/07/21 17:25:47 uebayasi Exp $ */ /* * Copyright (c) 1999-2003 Michael Shalayeff @@ -908,7 +908,7 @@ boot(int howto) boothowto = howto | (boothowto & RB_HALT); - if (!(howto & RB_NOSYNC)) { + if ((howto & RB_NOSYNC) == 0) { waittime = 0; vfs_shutdown(); @@ -924,7 +924,7 @@ boot(int howto) splhigh(); cold = 1; - if (howto & RB_DUMP) + if ((howto & RB_DUMP) != 0) dumpsys(); haltsys: @@ -941,8 +941,8 @@ haltsys: if (cold_hook) (*cold_hook)(HPPA_COLD_COLD); - if (howto & RB_HALT) { - if (howto & RB_POWERDOWN && cold_hook) { + if ((howto & RB_HALT) != 0) { + if ((howto & RB_POWERDOWN) != 0 && cold_hook) { printf("Powering off..."); DELAY(2000000); (*cold_hook)(HPPA_COLD_OFF); -- cgit v1.2.3