diff options
Diffstat (limited to 'sys/dev')
32 files changed, 89 insertions, 95 deletions
diff --git a/sys/dev/usb/hid.c b/sys/dev/usb/hid.c index 8dcc38aeea7..0ff1cffa6db 100644 --- a/sys/dev/usb/hid.c +++ b/sys/dev/usb/hid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hid.c,v 1.14 2002/07/25 04:07:32 nate Exp $ */ +/* $OpenBSD: hid.c,v 1.15 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: hid.c,v 1.23 2002/07/11 21:14:25 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/hid.c,v 1.11 1999/11/17 22:33:39 n_hibma Exp $ */ @@ -52,8 +52,8 @@ #include <dev/usb/hid.h> #ifdef UHIDEV_DEBUG -#define DPRINTF(x) if (uhidevdebug) logprintf x -#define DPRINTFN(n,x) if (uhidevdebug>(n)) logprintf x +#define DPRINTF(x) do { if (uhidevdebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (uhidevdebug>(n)) logprintf x; } while (0) extern int uhidevdebug; #else #define DPRINTF(x) diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index 967321784fa..f947cb663ec 100644 --- a/sys/dev/usb/if_aue.c +++ b/sys/dev/usb/if_aue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_aue.c,v 1.32 2003/12/15 23:36:14 cedric Exp $ */ +/* $OpenBSD: if_aue.c,v 1.33 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -149,8 +149,8 @@ #include <dev/usb/if_auereg.h> #ifdef AUE_DEBUG -#define DPRINTF(x) if (auedebug) logprintf x -#define DPRINTFN(n,x) if (auedebug >= (n)) logprintf x +#define DPRINTF(x) do { if (auedebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (auedebug >= (n)) logprintf x; } while (0) int auedebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index 07e84ba11a4..b8798725dea 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -142,8 +142,8 @@ #include <dev/usb/if_axereg.h> #ifdef AXE_DEBUG -#define DPRINTF(x) if (axedebug) logprintf x -#define DPRINTFN(n,x) if (axedebug >= (n)) logprintf x +#define DPRINTF(x) do { if (axedebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (axedebug >= (n)) logprintf x; } while (0) int axedebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index 39c39eb4056..d1b7c1b8bb8 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cue.c,v 1.20 2004/06/06 17:56:37 mcbride Exp $ */ +/* $OpenBSD: if_cue.c,v 1.21 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: if_cue.c,v 1.40 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -124,8 +124,8 @@ #include <dev/usb/if_cuereg.h> #ifdef CUE_DEBUG -#define DPRINTF(x) if (cuedebug) logprintf x -#define DPRINTFN(n,x) if (cuedebug >= (n)) logprintf x +#define DPRINTF(x) do { if (cuedebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (cuedebug >= (n)) logprintf x; } while (0) int cuedebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index 6a118d61a87..2ad4491e4ac 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_kue.c,v 1.25 2004/06/02 06:30:28 mcbride Exp $ */ +/* $OpenBSD: if_kue.c,v 1.26 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: if_kue.c,v 1.50 2002/07/16 22:00:31 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -140,8 +140,8 @@ #endif #ifdef KUE_DEBUG -#define DPRINTF(x) if (kuedebug) logprintf x -#define DPRINTFN(n,x) if (kuedebug >= (n)) logprintf x +#define DPRINTF(x) do { if (kuedebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (kuedebug >= (n)) logprintf x; } while (0) int kuedebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c index f5ffcf06939..7b47052a43d 100644 --- a/sys/dev/usb/if_upl.c +++ b/sys/dev/usb/if_upl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_upl.c,v 1.15 2003/12/15 23:36:14 cedric Exp $ */ +/* $OpenBSD: if_upl.c,v 1.16 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -188,8 +188,8 @@ struct upl_softc { }; #ifdef UPL_DEBUG -#define DPRINTF(x) if (upldebug) logprintf x -#define DPRINTFN(n,x) if (upldebug >= (n)) logprintf x +#define DPRINTF(x) do { if (upldebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (upldebug >= (n)) logprintf x; } while (0) int upldebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c index eb249cb05b0..7939c9c3050 100644 --- a/sys/dev/usb/if_url.c +++ b/sys/dev/usb/if_url.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_url.c,v 1.13 2003/12/23 09:16:11 deraadt Exp $ */ +/* $OpenBSD: if_url.c,v 1.14 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */ /* * Copyright (c) 2001, 2002 @@ -151,8 +151,8 @@ Static int url_mem(struct url_softc *, int, int, void *, int); /* Macros */ #ifdef URL_DEBUG -#define DPRINTF(x) if (urldebug) logprintf x -#define DPRINTFN(n,x) if (urldebug >= (n)) logprintf x +#define DPRINTF(x) do { if (urldebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (urldebug >= (n)) logprintf x; } while (0) int urldebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/if_wi_usb.c b/sys/dev/usb/if_wi_usb.c index 0e9a9795989..e8dd9d812d1 100644 --- a/sys/dev/usb/if_wi_usb.c +++ b/sys/dev/usb/if_wi_usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_wi_usb.c,v 1.10 2004/03/16 05:51:55 tedu Exp $ */ +/* $OpenBSD: if_wi_usb.c,v 1.11 2004/07/08 22:18:44 deraadt Exp $ */ /* * Copyright (c) 2003 Dale Rahn. All rights reserved. @@ -110,8 +110,8 @@ void wi_dump_data(void *buffer, int len); void wi_usb_thread(void *arg); #ifdef WI_USB_DEBUG -#define DPRINTF(x) if (wi_usbdebug) logprintf x -#define DPRINTFN(n,x) if (wi_usbdebug >= (n)) logprintf x +#define DPRINTF(x) do { if (wi_usbdebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (wi_usbdebug >= (n)) logprintf x; } while (0) int wi_usbdebug = 1; #else #define DPRINTF(x) diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c index 951b739c12f..d3ea0b56ba7 100644 --- a/sys/dev/usb/ohci.c +++ b/sys/dev/usb/ohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci.c,v 1.38 2004/05/04 16:59:32 grange Exp $ */ +/* $OpenBSD: ohci.c,v 1.39 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: ohci.c,v 1.139 2003/02/22 05:24:16 tsutsui Exp $ */ /* $FreeBSD: src/sys/dev/usb/ohci.c,v 1.22 1999/11/17 22:33:40 n_hibma Exp $ */ @@ -90,8 +90,8 @@ struct cfdriver ohci_cd = { #endif #ifdef OHCI_DEBUG -#define DPRINTF(x) if (ohcidebug) logprintf x -#define DPRINTFN(n,x) if (ohcidebug>(n)) logprintf x +#define DPRINTF(x) do { if (ohcidebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (ohcidebug>(n)) logprintf x; } while (0) int ohcidebug = 0; #ifndef __NetBSD__ #define bitmask_snprintf(q,f,b,l) snprintf((b), (l), "%b", (q), (f)) diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c index 306691ed2da..68bfd7b1cc5 100644 --- a/sys/dev/usb/uaudio.c +++ b/sys/dev/usb/uaudio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uaudio.c,v 1.18 2003/11/07 11:10:47 jmc Exp $ */ +/* $OpenBSD: uaudio.c,v 1.19 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: uaudio.c,v 1.67 2003/05/03 18:11:41 wiz Exp $ */ /* @@ -72,8 +72,8 @@ #include <dev/usb/uaudioreg.h> #ifdef UAUDIO_DEBUG -#define DPRINTF(x) if (uaudiodebug) logprintf x -#define DPRINTFN(n,x) if (uaudiodebug>(n)) logprintf x +#define DPRINTF(x) do { if (uaudiodebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (uaudiodebug>(n)) logprintf x; } while (0) int uaudiodebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/ubsa.c b/sys/dev/usb/ubsa.c index 96b166384d7..90aacbc04a1 100644 --- a/sys/dev/usb/ubsa.c +++ b/sys/dev/usb/ubsa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ubsa.c,v 1.4 2003/11/11 15:14:56 miod Exp $ */ +/* $OpenBSD: ubsa.c,v 1.5 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: ubsa.c,v 1.5 2002/11/25 00:51:33 fvdl Exp $ */ /*- * Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>. @@ -105,10 +105,7 @@ SYSCTL_INT(_hw_usb_ubsa, OID_AUTO, debug, CTLFLAG_RW, &ubsadebug, 0, "ubsa debug level"); #endif -#define DPRINTFN(n, x) do { \ - if (ubsadebug > (n)) \ - logprintf x; \ - } while (0) +#define DPRINTFN(n, x) do { if (ubsadebug > (n)) logprintf x; } while (0) #else #define DPRINTFN(n, x) #endif diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c index 85f48b50e2f..bcb601a7720 100644 --- a/sys/dev/usb/ucom.c +++ b/sys/dev/usb/ucom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ucom.c,v 1.20 2003/10/03 16:44:51 miod Exp $ */ +/* $OpenBSD: ucom.c,v 1.21 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: ucom.c,v 1.49 2003/01/01 00:10:25 thorpej Exp $ */ /* @@ -74,7 +74,7 @@ #if NUCOM > 0 #ifdef UCOM_DEBUG -#define DPRINTFN(n, x) if (ucomdebug > (n)) logprintf x +#define DPRINTFN(n, x) do { if (ucomdebug > (n)) logprintf x; } while (0) int ucomdebug = 0; #else #define DPRINTFN(n, x) diff --git a/sys/dev/usb/udsbr.c b/sys/dev/usb/udsbr.c index d990c68f4fd..29e830f5d78 100644 --- a/sys/dev/usb/udsbr.c +++ b/sys/dev/usb/udsbr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udsbr.c,v 1.6 2003/05/07 04:33:33 deraadt Exp $ */ +/* $OpenBSD: udsbr.c,v 1.7 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: udsbr.c,v 1.7 2002/07/11 21:14:27 augustss Exp $ */ /* @@ -60,8 +60,8 @@ #include <dev/usb/usbdevs.h> #ifdef UDSBR_DEBUG -#define DPRINTF(x) if (udsbrdebug) logprintf x -#define DPRINTFN(n,x) if (udsbrdebug>(n)) logprintf x +#define DPRINTF(x) do { if (udsbrdebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (udsbrdebug>(n)) logprintf x; } while (0) int udsbrdebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c index 92ae94c3158..feee3004c41 100644 --- a/sys/dev/usb/ugen.c +++ b/sys/dev/usb/ugen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ugen.c,v 1.28 2003/06/27 16:57:14 nate Exp $ */ +/* $OpenBSD: ugen.c,v 1.29 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: ugen.c,v 1.63 2002/11/26 18:49:48 christos Exp $ */ /* $FreeBSD: src/sys/dev/usb/ugen.c,v 1.26 1999/11/17 22:33:41 n_hibma Exp $ */ @@ -68,8 +68,8 @@ #include <dev/usb/usbdi_util.h> #ifdef UGEN_DEBUG -#define DPRINTF(x) if (ugendebug) logprintf x -#define DPRINTFN(n,x) if (ugendebug>(n)) logprintf x +#define DPRINTF(x) do { if (ugendebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (ugendebug>(n)) logprintf x; } while (0) int ugendebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c index e168efb4d69..895866d1c58 100644 --- a/sys/dev/usb/uhid.c +++ b/sys/dev/usb/uhid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhid.c,v 1.26 2003/06/27 16:57:14 nate Exp $ */ +/* $OpenBSD: uhid.c,v 1.27 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: uhid.c,v 1.57 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -69,8 +69,8 @@ #include <dev/usb/uhidev.h> #ifdef UHID_DEBUG -#define DPRINTF(x) if (uhiddebug) logprintf x -#define DPRINTFN(n,x) if (uhiddebug>(n)) logprintf x +#define DPRINTF(x) do { if (uhiddebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (uhiddebug>(n)) logprintf x; } while (0) int uhiddebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c index f53c87bdd35..4ac45aaa2ba 100644 --- a/sys/dev/usb/uhidev.c +++ b/sys/dev/usb/uhidev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhidev.c,v 1.9 2003/07/05 16:52:04 nate Exp $ */ +/* $OpenBSD: uhidev.c,v 1.10 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: uhidev.c,v 1.14 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -66,8 +66,8 @@ #include <dev/usb/ugraphire_rdesc.h> #ifdef UHIDEV_DEBUG -#define DPRINTF(x) if (uhidevdebug) logprintf x -#define DPRINTFN(n,x) if (uhidevdebug>(n)) logprintf x +#define DPRINTF(x) do { if (uhidevdebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (uhidevdebug>(n)) logprintf x; } while (0) int uhidevdebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index ee99a1ceed7..53dcaee6b50 100644 --- a/sys/dev/usb/uhub.c +++ b/sys/dev/usb/uhub.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhub.c,v 1.23 2004/07/07 01:26:40 deraadt Exp $ */ +/* $OpenBSD: uhub.c,v 1.24 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: uhub.c,v 1.64 2003/02/08 03:32:51 ichiro Exp $ */ /* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */ @@ -66,8 +66,8 @@ #define UHUB_INTR_INTERVAL 255 /* ms */ #ifdef UHUB_DEBUG -#define DPRINTF(x) if (uhubdebug) logprintf x -#define DPRINTFN(n,x) if (uhubdebug>(n)) logprintf x +#define DPRINTF(x) do { if (uhubdebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (uhubdebug>(n)) logprintf x; } while (0) int uhubdebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/ukbd.c b/sys/dev/usb/ukbd.c index e2d292b4130..d7e6a2031f9 100644 --- a/sys/dev/usb/ukbd.c +++ b/sys/dev/usb/ukbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ukbd.c,v 1.19 2003/07/05 16:56:45 nate Exp $ */ +/* $OpenBSD: ukbd.c,v 1.20 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: ukbd.c,v 1.85 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -81,8 +81,8 @@ #endif #ifdef UKBD_DEBUG -#define DPRINTF(x) if (ukbddebug) logprintf x -#define DPRINTFN(n,x) if (ukbddebug>(n)) logprintf x +#define DPRINTF(x) do { if (ukbddebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (ukbddebug>(n)) logprintf x; } while (0) int ukbddebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c index 7abeec341e3..987633de297 100644 --- a/sys/dev/usb/ulpt.c +++ b/sys/dev/usb/ulpt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ulpt.c,v 1.18 2003/11/07 11:10:47 jmc Exp $ */ +/* $OpenBSD: ulpt.c,v 1.19 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: ulpt.c,v 1.57 2003/01/05 10:19:42 scw Exp $ */ /* $FreeBSD: src/sys/dev/usb/ulpt.c,v 1.24 1999/11/17 22:33:44 n_hibma Exp $ */ @@ -74,8 +74,8 @@ #define ULPT_BSIZE 16384 #ifdef ULPT_DEBUG -#define DPRINTF(x) if (ulptdebug) logprintf x -#define DPRINTFN(n,x) if (ulptdebug>(n)) logprintf x +#define DPRINTF(x) do { if (ulptdebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (ulptdebug>(n)) logprintf x; } while (0) int ulptdebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/umct.c b/sys/dev/usb/umct.c index 03788a85e12..6739be85ac2 100644 --- a/sys/dev/usb/umct.c +++ b/sys/dev/usb/umct.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umct.c,v 1.10 2004/04/20 16:28:36 pvalchev Exp $ */ +/* $OpenBSD: umct.c,v 1.11 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: umct.c,v 1.10 2003/02/23 04:20:07 simonb Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ #include <dev/usb/umct.h> #ifdef UMCT_DEBUG -#define DPRINTFN(n, x) if (umctdebug > (n)) logprintf x +#define DPRINTFN(n, x) do { if (umctdebug > (n)) logprintf x; } while (0) int umctdebug = 0; #else #define DPRINTFN(n, x) diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c index 0759ea9dc4e..6098dec3f62 100644 --- a/sys/dev/usb/umodem.c +++ b/sys/dev/usb/umodem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: umodem.c,v 1.15 2003/11/07 11:10:47 jmc Exp $ */ +/* $OpenBSD: umodem.c,v 1.16 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: umodem.c,v 1.45 2002/09/23 05:51:23 simonb Exp $ */ /* @@ -76,7 +76,7 @@ #include <dev/usb/ucomvar.h> #ifdef UMODEM_DEBUG -#define DPRINTFN(n, x) if (umodemdebug > (n)) logprintf x +#define DPRINTFN(n, x) do { if (umodemdebug > (n)) logprintf x; } while (0) int umodemdebug = 0; #else #define DPRINTFN(n, x) diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c index bf78fb9f83c..25480133aa0 100644 --- a/sys/dev/usb/ums.c +++ b/sys/dev/usb/ums.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ums.c,v 1.13 2003/05/19 00:37:19 nate Exp $ */ +/* $OpenBSD: ums.c,v 1.14 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: ums.c,v 1.60 2003/03/11 16:44:00 augustss Exp $ */ /* @@ -69,8 +69,8 @@ #include <dev/wscons/wsmousevar.h> #ifdef USB_DEBUG -#define DPRINTF(x) if (umsdebug) logprintf x -#define DPRINTFN(n,x) if (umsdebug>(n)) logprintf x +#define DPRINTF(x) do { if (umsdebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (umsdebug>(n)) logprintf x; } while (0) int umsdebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c index fbefb39646c..b4618e7f596 100644 --- a/sys/dev/usb/uplcom.c +++ b/sys/dev/usb/uplcom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uplcom.c,v 1.12 2004/05/26 22:25:54 markus Exp $ */ +/* $OpenBSD: uplcom.c,v 1.13 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: uplcom.c,v 1.29 2002/09/23 05:51:23 simonb Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ #include <dev/usb/ucomvar.h> #ifdef UPLCOM_DEBUG -#define DPRINTFN(n, x) if (uplcomdebug > (n)) logprintf x +#define DPRINTFN(n, x) do { if (uplcomdebug > (n)) logprintf x; } while (0) int uplcomdebug = 0; #else #define DPRINTFN(n, x) diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c index bcc4ca2eaa1..d0b30a72ffd 100644 --- a/sys/dev/usb/urio.c +++ b/sys/dev/usb/urio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: urio.c,v 1.17 2003/05/17 17:23:39 nate Exp $ */ +/* $OpenBSD: urio.c,v 1.18 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: urio.c,v 1.15 2002/10/23 09:14:02 jdolecek Exp $ */ /* @@ -73,8 +73,8 @@ #include <dev/usb/urio.h> #ifdef URIO_DEBUG -#define DPRINTF(x) if (uriodebug) logprintf x -#define DPRINTFN(n,x) if (uriodebug>(n)) logprintf x +#define DPRINTF(x) do { if (uriodebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (uriodebug>(n)) logprintf x; } while (0) int uriodebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c index 60e918b2865..6d7f6d242b9 100644 --- a/sys/dev/usb/usb.c +++ b/sys/dev/usb/usb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb.c,v 1.28 2004/06/24 19:35:24 tholo Exp $ */ +/* $OpenBSD: usb.c,v 1.29 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: usb.c,v 1.77 2003/01/01 00:10:26 thorpej Exp $ */ /* @@ -73,8 +73,8 @@ #include <dev/usb/usb_quirks.h> #ifdef USB_DEBUG -#define DPRINTF(x) if (usbdebug) logprintf x -#define DPRINTFN(n,x) if (usbdebug>(n)) logprintf x +#define DPRINTF(x) do { if (usbdebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (usbdebug>(n)) logprintf x; } while (0) int usbdebug = 0; #if defined(UHCI_DEBUG) && NUHCI > 0 extern int uhcidebug; diff --git a/sys/dev/usb/usb_mem.c b/sys/dev/usb/usb_mem.c index 56489a6a6d4..67e72461c88 100644 --- a/sys/dev/usb/usb_mem.c +++ b/sys/dev/usb/usb_mem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_mem.c,v 1.15 2003/08/06 20:43:12 millert Exp $ */ +/* $OpenBSD: usb_mem.c,v 1.16 2004/07/08 22:18:44 deraadt Exp $ */ /* $NetBSD: usb_mem.c,v 1.26 2003/02/01 06:23:40 thorpej Exp $ */ /* @@ -63,8 +63,8 @@ #include <dev/usb/usb_mem.h> #ifdef USB_DEBUG -#define DPRINTF(x) if (usbdebug) logprintf x -#define DPRINTFN(n,x) if (usbdebug>(n)) logprintf x +#define DPRINTF(x) do { if (usbdebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (usbdebug>(n)) logprintf x; } while (0) extern int usbdebug; #else #define DPRINTF(x) diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c index 8d9f40db20b..73b2ad0d103 100644 --- a/sys/dev/usb/usb_subr.c +++ b/sys/dev/usb/usb_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usb_subr.c,v 1.26 2003/07/08 13:19:09 nate Exp $ */ +/* $OpenBSD: usb_subr.c,v 1.27 2004/07/08 22:18:45 deraadt Exp $ */ /* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */ @@ -68,8 +68,8 @@ #endif #ifdef USB_DEBUG -#define DPRINTF(x) if (usbdebug) logprintf x -#define DPRINTFN(n,x) if (usbdebug>(n)) logprintf x +#define DPRINTF(x) do { if (usbdebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (usbdebug>(n)) logprintf x; } while (0) extern int usbdebug; #else #define DPRINTF(x) diff --git a/sys/dev/usb/usbdi.c b/sys/dev/usb/usbdi.c index e4ac054179b..c18409b12a1 100644 --- a/sys/dev/usb/usbdi.c +++ b/sys/dev/usb/usbdi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi.c,v 1.24 2004/05/04 16:59:32 grange Exp $ */ +/* $OpenBSD: usbdi.c,v 1.25 2004/07/08 22:18:45 deraadt Exp $ */ /* $NetBSD: usbdi.c,v 1.103 2002/09/27 15:37:38 provos Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $ */ @@ -69,8 +69,8 @@ #endif #ifdef USB_DEBUG -#define DPRINTF(x) if (usbdebug) logprintf x -#define DPRINTFN(n,x) if (usbdebug>(n)) logprintf x +#define DPRINTF(x) do { if (usbdebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (usbdebug>(n)) logprintf x; } while (0) extern int usbdebug; #else #define DPRINTF(x) diff --git a/sys/dev/usb/usbdi_util.c b/sys/dev/usb/usbdi_util.c index 66d05ba40a6..69fd35b6308 100644 --- a/sys/dev/usb/usbdi_util.c +++ b/sys/dev/usb/usbdi_util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi_util.c,v 1.15 2003/07/08 13:19:09 nate Exp $ */ +/* $OpenBSD: usbdi_util.c,v 1.16 2004/07/08 22:18:45 deraadt Exp $ */ /* $NetBSD: usbdi_util.c,v 1.40 2002/07/11 21:14:36 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi_util.c,v 1.14 1999/11/17 22:33:50 n_hibma Exp $ */ @@ -57,8 +57,8 @@ #include <dev/usb/usbdi_util.h> #ifdef USB_DEBUG -#define DPRINTF(x) if (usbdebug) logprintf x -#define DPRINTFN(n,x) if (usbdebug>(n)) logprintf x +#define DPRINTF(x) do { if (usbdebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (usbdebug>(n)) logprintf x; } while (0) extern int usbdebug; #else #define DPRINTF(x) diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c index 193cb61e12e..6e0f6e179a8 100644 --- a/sys/dev/usb/uscanner.c +++ b/sys/dev/usb/uscanner.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uscanner.c,v 1.16 2003/06/27 16:57:14 nate Exp $ */ +/* $OpenBSD: uscanner.c,v 1.17 2004/07/08 22:18:45 deraadt Exp $ */ /* $NetBSD: uscanner.c,v 1.40 2003/01/27 00:32:44 wiz Exp $ */ /* @@ -72,8 +72,8 @@ #include <dev/usb/usbdevs.h> #ifdef USCANNER_DEBUG -#define DPRINTF(x) if (uscannerdebug) logprintf x -#define DPRINTFN(n,x) if (uscannerdebug>(n)) logprintf x +#define DPRINTF(x) do { if (uscannerdebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (uscannerdebug>(n)) logprintf x; } while (0) int uscannerdebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/usscanner.c b/sys/dev/usb/usscanner.c index 3ab9f622ebb..ed95dd48dac 100644 --- a/sys/dev/usb/usscanner.c +++ b/sys/dev/usb/usscanner.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usscanner.c,v 1.8 2003/05/17 06:07:57 nate Exp $ */ +/* $OpenBSD: usscanner.c,v 1.9 2004/07/08 22:18:45 deraadt Exp $ */ /* $NetBSD: usscanner.c,v 1.6 2001/01/23 14:04:14 augustss Exp $ */ /* @@ -81,8 +81,8 @@ #endif #ifdef USSCANNER_DEBUG -#define DPRINTF(x) if (usscannerdebug) logprintf x -#define DPRINTFN(n,x) if (usscannerdebug>(n)) logprintf x +#define DPRINTF(x) do { if (usscannerdebug) logprintf x; } while (0) +#define DPRINTFN(n,x) do { if (usscannerdebug>(n)) logprintf x; } while (0) int usscannerdebug = 0; #else #define DPRINTF(x) diff --git a/sys/dev/usb/uvscom.c b/sys/dev/usb/uvscom.c index a99e4add18e..34f0c4c89a7 100644 --- a/sys/dev/usb/uvscom.c +++ b/sys/dev/usb/uvscom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uvscom.c,v 1.3 2003/05/17 17:07:32 nate Exp $ */ +/* $OpenBSD: uvscom.c,v 1.4 2004/07/08 22:18:45 deraadt Exp $ */ /* $NetBSD: uvscom.c,v 1.9 2003/02/12 15:36:20 ichiro Exp $ */ /*- * Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama@jp.FreeBSD.org>. @@ -81,10 +81,7 @@ SYSCTL_INT(_debug_usb, OID_AUTO, uvscom, CTLFLAG_RW, #endif -#define DPRINTFN(n, x) do { \ - if (uvscomdebug > (n)) \ - logprintf x; \ - } while (0) +#define DPRINTFN(n, x) do { if (uvscomdebug > (n)) logprintf x; } while (0) #else #define DPRINTFN(n, x) #endif |