summaryrefslogtreecommitdiff
path: root/sys/dev/ata/ata_wdc.c
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2002-12-19 16:33:00 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2002-12-19 16:33:00 +0000
commit398a6b97facf2f7106e658682d2d30aa6bd6220e (patch)
tree2792cdb8719ee1d7993dfd39b2216d4baaccdae3 /sys/dev/ata/ata_wdc.c
parent86103d0701c7eeb6e743f4cd8ba63f6baa29ba7c (diff)
Protect WDCDEBUG_PRINT macro with do {} while (0)
ok costa@
Diffstat (limited to 'sys/dev/ata/ata_wdc.c')
-rw-r--r--sys/dev/ata/ata_wdc.c9
1 files changed, 5 insertions, 4 deletions
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