From 398a6b97facf2f7106e658682d2d30aa6bd6220e Mon Sep 17 00:00:00 2001 From: Alexander Yurchenko Date: Thu, 19 Dec 2002 16:33:00 +0000 Subject: Protect WDCDEBUG_PRINT macro with do {} while (0) ok costa@ --- sys/dev/ata/ata_wdc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'sys/dev/ata/ata_wdc.c') 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 -- cgit v1.2.3