Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Use do { ... } whille (0) for DPRINTF(x, y).



details:   https://anonhg.NetBSD.org/src/rev/7ca0e15b9a84
branches:  trunk
changeset: 449335:7ca0e15b9a84
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Mar 04 05:28:48 2019 +0000

description:
Use  do { ... } whille (0) for DPRINTF(x, y).

diffstat:

 sys/dev/pci/if_wm.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 74c0fff98d04 -r 7ca0e15b9a84 sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Mon Mar 04 01:16:33 2019 +0000
+++ b/sys/dev/pci/if_wm.c       Mon Mar 04 05:28:48 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.629 2019/02/28 16:56:35 khorben Exp $      */
+/*     $NetBSD: if_wm.c,v 1.630 2019/03/04 05:28:48 msaitoh Exp $      */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.629 2019/02/28 16:56:35 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.630 2019/03/04 05:28:48 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -157,7 +157,7 @@
 int    wm_debug = WM_DEBUG_TX | WM_DEBUG_RX | WM_DEBUG_LINK | WM_DEBUG_GMII
     | WM_DEBUG_MANAGE | WM_DEBUG_NVM | WM_DEBUG_INIT | WM_DEBUG_LOCK;
 
-#define        DPRINTF(x, y)   if (wm_debug & (x)) printf y
+#define        DPRINTF(x, y)   do { if (wm_debug & (x)) printf y; } while (0)
 #else
 #define        DPRINTF(x, y)   __nothing
 #endif /* WM_DEBUG */



Home | Main Index | Thread Index | Old Index