diff options
-rw-r--r-- | sys/dev/ata/ata.c | 9 | ||||
-rw-r--r-- | sys/dev/ata/ata_wdc.c | 9 | ||||
-rw-r--r-- | sys/dev/ata/wd.c | 9 | ||||
-rw-r--r-- | sys/dev/atapiscsi/atapiscsi.c | 9 | ||||
-rw-r--r-- | sys/dev/ic/wdc.c | 7 | ||||
-rw-r--r-- | sys/dev/pci/pciide.c | 8 |
6 files changed, 30 insertions, 21 deletions
diff --git a/sys/dev/ata/ata.c b/sys/dev/ata/ata.c index e92076922f2..4da37f5d33a 100644 --- a/sys/dev/ata/ata.c +++ b/sys/dev/ata/ata.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ata.c,v 1.13 2001/09/21 17:55:43 miod Exp $ */ +/* $OpenBSD: ata.c,v 1.14 2002/12/19 16:32:59 grange Exp $ */ /* $NetBSD: ata.c,v 1.9 1999/04/15 09:41:09 bouyer Exp $ */ /* * Copyright (c) 1998 Manuel Bouyer. All rights reserved. @@ -49,9 +49,10 @@ #define DEBUG_PROBE 0x10 #ifdef WDCDEBUG extern int wdcdebug_mask; /* init'ed in wdc.c */ -#define WDCDEBUG_PRINT(args, level) \ - if (wdcdebug_mask & (level)) \ - printf args +#define WDCDEBUG_PRINT(args, level) do { \ + if ((wdcdebug_mask & (level)) != 0) \ + printf args; \ +} while (0) #else #define WDCDEBUG_PRINT(args, level) #endif diff --git a/sys/dev/ata/ata_wdc.c b/sys/dev/ata/ata_wdc.c index ab713fbc801..8df770074aa 100644 --- a/sys/dev/ata/ata_wdc.c +++ b/sys/dev/ata/ata_wdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ata_wdc.c,v 1.16 2002/10/12 01:09:44 krw Exp $ */ +/* $OpenBSD: ata_wdc.c,v 1.17 2002/12/19 16:32:59 grange Exp $ */ /* $NetBSD: ata_wdc.c,v 1.21 1999/08/09 09:43:11 bouyer Exp $ */ /* @@ -99,9 +99,10 @@ #ifdef WDCDEBUG int wdcdebug_wd_mask = 0; -#define WDCDEBUG_PRINT(args, level) \ - if (wdcdebug_wd_mask & (level)) \ - printf args +#define WDCDEBUG_PRINT(args, level) do { \ + if ((wdcdebug_wd_mask & (level)) != 0) \ + printf args; \ +} while (0) #else #define WDCDEBUG_PRINT(args, level) #endif diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index 8c728702f3d..5ba15265c05 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.25 2002/05/24 09:34:25 art Exp $ */ +/* $OpenBSD: wd.c,v 1.26 2002/12/19 16:32:59 grange Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -122,9 +122,10 @@ #define DEBUG_PROBE 0x10 #ifdef WDCDEBUG extern int wdcdebug_wd_mask; /* init'ed in ata_wdc.c */ -#define WDCDEBUG_PRINT(args, level) \ - if (wdcdebug_wd_mask & (level)) \ - printf args +#define WDCDEBUG_PRINT(args, level) do { \ + if ((wdcdebug_wd_mask & (level)) != 0) \ + printf args; \ +} while (0) #else #define WDCDEBUG_PRINT(args, level) #endif diff --git a/sys/dev/atapiscsi/atapiscsi.c b/sys/dev/atapiscsi/atapiscsi.c index ac7de00baf4..3260aa9b482 100644 --- a/sys/dev/atapiscsi/atapiscsi.c +++ b/sys/dev/atapiscsi/atapiscsi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atapiscsi.c,v 1.61 2002/05/21 08:42:03 espie Exp $ */ +/* $OpenBSD: atapiscsi.c,v 1.62 2002/12/19 16:32:59 grange Exp $ */ /* * This code is derived from code with the copyright below. @@ -92,9 +92,10 @@ enum atapi_drive_states { #if defined(WDCDEBUG) int wdcdebug_atapi_mask = 0; -#define WDCDEBUG_PRINT(args, level) \ - if (wdcdebug_atapi_mask & (level)) \ - printf args +#define WDCDEBUG_PRINT(args, level) do { \ + if ((wdcdebug_atapi_mask & (level)) != 0) \ + printf args; \ +} while (0) #else #define WDCDEBUG_PRINT(args, level) #endif diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c index e5576aacda7..4e69720dfad 100644 --- a/sys/dev/ic/wdc.c +++ b/sys/dev/ic/wdc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wdc.c,v 1.55 2002/12/12 10:26:26 grange Exp $ */ +/* $OpenBSD: wdc.c,v 1.56 2002/12/19 16:32:59 grange Exp $ */ /* $NetBSD: wdc.c,v 1.68 1999/06/23 19:00:17 bouyer Exp $ */ @@ -119,7 +119,10 @@ void wdc_kill_pending(struct channel_softc *); #ifdef WDCDEBUG int wdcdebug_mask = 0; int wdc_nxfer = 0; -#define WDCDEBUG_PRINT(args, level) if (wdcdebug_mask & (level)) printf args +#define WDCDEBUG_PRINT(args, level) do { \ + if ((wdcdebug_mask & (level)) != 0) \ + printf args; \ +} while (0) #else #define WDCDEBUG_PRINT(args, level) #endif diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index f9984e6e371..bc2cdcc47bc 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciide.c,v 1.101 2002/12/10 11:47:47 grange Exp $ */ +/* $OpenBSD: pciide.c,v 1.102 2002/12/19 16:32:59 grange Exp $ */ /* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */ /* @@ -82,8 +82,10 @@ #ifdef WDCDEBUG int wdcdebug_pciide_mask = 0; -#define WDCDEBUG_PRINT(args, level) \ - if (wdcdebug_pciide_mask & (level)) printf args +#define WDCDEBUG_PRINT(args, level) do { \ + if ((wdcdebug_pciide_mask & (level)) != 0) \ + printf args; \ +} while (0) #else #define WDCDEBUG_PRINT(args, level) #endif |