Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys use C99 style for variadic macro arguments
details: https://anonhg.NetBSD.org/src/rev/0522984a56cb
branches: trunk
changeset: 763306:0522984a56cb
user: plunky <plunky%NetBSD.org@localhost>
date: Wed Mar 16 21:35:30 2011 +0000
description:
use C99 style for variadic macro arguments
diffstat:
sys/dev/bluetooth/btsco.c | 20 ++++++++++++--------
sys/dev/usb/ubt.c | 20 ++++++++++++--------
sys/dev/usb/uhso.c | 12 +++++++-----
sys/netbt/bluetooth.h | 18 +++++++++++-------
4 files changed, 42 insertions(+), 28 deletions(-)
diffs (153 lines):
diff -r 8ad9cdbe899c -r 0522984a56cb sys/dev/bluetooth/btsco.c
--- a/sys/dev/bluetooth/btsco.c Wed Mar 16 21:15:29 2011 +0000
+++ b/sys/dev/bluetooth/btsco.c Wed Mar 16 21:35:30 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: btsco.c,v 1.23 2009/05/12 12:10:46 cegger Exp $ */
+/* $NetBSD: btsco.c,v 1.24 2011/03/16 21:38:54 plunky Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: btsco.c,v 1.23 2009/05/12 12:10:46 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: btsco.c,v 1.24 2011/03/16 21:38:54 plunky Exp $");
#include <sys/param.h>
#include <sys/audioio.h>
@@ -66,14 +66,18 @@
#ifdef BTSCO_DEBUG
int btsco_debug = BTSCO_DEBUG;
-#define DPRINTF(fmt, args...) do { \
- if (btsco_debug) \
- printf("%s: "fmt, __func__ , ##args); \
+#define DPRINTF(...) do { \
+ if (btsco_debug) { \
+ printf("%s: ", __func__); \
+ printf(__VA_ARGS__); \
+ } \
} while (/* CONSTCOND */0)
-#define DPRINTFN(n, fmt, args...) do { \
- if (btsco_debug > (n)) \
- printf("%s: "fmt, __func__ , ##args); \
+#define DPRINTFN(n, ...) do { \
+ if (btsco_debug > (n)) { \
+ printf("%s: ", __func__); \
+ printf(__VA_ARGS__); \
+ } \
} while (/* CONSTCOND */0)
#else
#define DPRINTF(...)
diff -r 8ad9cdbe899c -r 0522984a56cb sys/dev/usb/ubt.c
--- a/sys/dev/usb/ubt.c Wed Mar 16 21:15:29 2011 +0000
+++ b/sys/dev/usb/ubt.c Wed Mar 16 21:35:30 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ubt.c,v 1.39 2010/11/03 22:34:23 dyoung Exp $ */
+/* $NetBSD: ubt.c,v 1.40 2011/03/16 21:36:55 plunky Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.39 2010/11/03 22:34:23 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.40 2011/03/16 21:36:55 plunky Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -97,14 +97,18 @@
#ifdef UBT_DEBUG
int ubt_debug = 0;
-#define DPRINTF(fmt, args...) do { \
- if (ubt_debug) \
- printf("%s: "fmt, __func__ , ##args); \
+#define DPRINTF(...) do { \
+ if (ubt_debug) { \
+ printf("%s: ", __func__); \
+ printf(__VA_ARGS__); \
+ } \
} while (/* CONSTCOND */0)
-#define DPRINTFN(n, fmt, args...) do { \
- if (ubt_debug > (n)) \
- printf("%s: "fmt, __func__ , ##args); \
+#define DPRINTFN(n, ...) do { \
+ if (ubt_debug > (n)) { \
+ printf("%s: ", __func__); \
+ printf(__VA_ARGS__); \
+ } \
} while (/* CONSTCOND */0)
SYSCTL_SETUP(sysctl_hw_ubt_debug_setup, "sysctl hw.ubt_debug setup")
diff -r 8ad9cdbe899c -r 0522984a56cb sys/dev/usb/uhso.c
--- a/sys/dev/usb/uhso.c Wed Mar 16 21:15:29 2011 +0000
+++ b/sys/dev/usb/uhso.c Wed Mar 16 21:35:30 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhso.c,v 1.3 2010/11/15 06:01:29 uebayasi Exp $ */
+/* $NetBSD: uhso.c,v 1.4 2011/03/16 21:36:55 plunky Exp $ */
/*-
* Copyright (c) 2009 Iain Hibbert
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.3 2010/11/15 06:01:29 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.4 2011/03/16 21:36:55 plunky Exp $");
#include "opt_inet.h"
@@ -87,9 +87,11 @@
*/
int uhso_debug = 0;
-#define DPRINTF(n, fmt, args...) do { \
- if (uhso_debug >= (n)) \
- printf("%s: "fmt, __func__ , ##args); \
+#define DPRINTF(n, ...) do { \
+ if (uhso_debug >= (n)) { \
+ printf("%s: ", __func__); \
+ printf(__VA_ARGS__); \
+ } \
} while (/* CONSTCOND */0)
#else
#define DPRINTF(...) ((void)0)
diff -r 8ad9cdbe899c -r 0522984a56cb sys/netbt/bluetooth.h
--- a/sys/netbt/bluetooth.h Wed Mar 16 21:15:29 2011 +0000
+++ b/sys/netbt/bluetooth.h Wed Mar 16 21:35:30 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bluetooth.h,v 1.9 2010/03/26 18:15:15 pooka Exp $ */
+/* $NetBSD: bluetooth.h,v 1.10 2011/03/16 21:35:30 plunky Exp $ */
/*-
* Copyright (c) 2005 Iain Hibbert.
@@ -124,14 +124,18 @@
*/
#ifdef BLUETOOTH_DEBUG
extern int bluetooth_debug;
-# define DPRINTF(fmt, args...) do { \
- if (bluetooth_debug) \
- printf("%s: "fmt, __func__ , ##args); \
+# define DPRINTF(...) do { \
+ if (bluetooth_debug) { \
+ printf("%s: ", __func__); \
+ printf(__VA_ARGS__); \
+ } \
} while (/* CONSTCOND */0)
-# define DPRINTFN(n, fmt, args...) do { \
- if (bluetooth_debug > (n)) \
- printf("%s: "fmt, __func__ , ##args); \
+# define DPRINTFN(n, ...) do { \
+ if (bluetooth_debug > (n)) { \
+ printf("%s: ", __func__); \
+ printf(__VA_ARGS__); \
+ } \
} while (/* CONSTCOND */0)
# define UNKNOWN(value) \
Home |
Main Index |
Thread Index |
Old Index