summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Larkin <mlarkin@cvs.openbsd.org>2017-11-11 02:35:17 +0000
committerMike Larkin <mlarkin@cvs.openbsd.org>2017-11-11 02:35:17 +0000
commit15e328ed37069c4406fc2c1f545dc98427d78a54 (patch)
tree19acc207a82a8d90c2827497cf5b385fa275817e
parent10e61e70911af9e024a7de109c08f52eded48226 (diff)
Fix a broken compilation when using SCSIDEBUG options(4).
Diff from Carlos Cardenas, thanks! ok krw@
-rw-r--r--sys/scsi/scsi_debug.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/scsi/scsi_debug.h b/sys/scsi/scsi_debug.h
index bf1519fa36d..577eaaea5d0 100644
--- a/sys/scsi/scsi_debug.h
+++ b/sys/scsi/scsi_debug.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsi_debug.h,v 1.12 2016/03/12 15:16:04 krw Exp $ */
+/* $OpenBSD: scsi_debug.h,v 1.13 2017/11/11 02:35:16 mlarkin Exp $ */
/* $NetBSD: scsi_debug.h,v 1.7 1996/10/12 23:23:16 christos Exp $ */
/*
@@ -40,15 +40,17 @@ extern int scsidebug_level;
* This is the usual debug macro for use with the above bits
*/
#ifdef SCSIDEBUG
-#define SC_DEBUG(link,Level,Printstuff) \
+#define SC_DEBUG(link,Level,Printstuff) do {\
if ((link)->flags & (Level)) { \
sc_print_addr(link); \
printf Printstuff; \
- }
-#define SC_DEBUGN(link,Level,Printstuff) \
+ } \
+} while (0)
+#define SC_DEBUGN(link,Level,Printstuff) do {\
if ((link)->flags & (Level)) { \
printf Printstuff; \
- }
+ } \
+} while (0)
#else
#define SC_DEBUG(A,B,C)
#define SC_DEBUGN(A,B,C)