[Madwifi-cvs] revision 3912 committed
Status: Beta
Brought to you by:
otaku
From: Pavel R. <svn...@ma...> - 2009-01-14 16:19:59
|
Project : madwifi Revision : 3912 Author : proski (Pavel Roskin) Date : 2009-01-14 17:19:43 +0100 (Wed, 14 Jan 2009) Log Message : Convert dbg() and err() to strict C99 Don't use optional comma before __VA_ARGS__. This really fixes gcc 2.95 compatibility. Also use __func__, not __FUNCTION__. Affected Files: * ath_info/trunk/ath_info.c updated Modified: ath_info/trunk/ath_info.c =================================================================== --- ath_info/trunk/ath_info.c 2009-01-14 05:04:01 UTC (rev 3911) +++ ath_info/trunk/ath_info.c 2009-01-14 16:19:43 UTC (rev 3912) @@ -33,14 +33,20 @@ #undef ARRAY_SIZE #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) -#define dbg(fmt, ...) \ +#define dbg(...) \ do { \ if (verbose) \ - printf("#DBG %s: " fmt "\n", __FUNCTION__, ## __VA_ARGS__); \ + printf("#DBG %s: ", __func__); \ + printf(__VA_ARGS__); \ + printf("\n"); \ } while (0) -#define err(fmt, ...) \ -fprintf(stderr, "#ERR %s: " fmt "\n", __FUNCTION__, ## __VA_ARGS__) +#define err(...) \ +do { \ + printf("#ERR %s: ", __func__); \ + printf(__VA_ARGS__); \ + printf("\n"); \ + } while (0) #define AR5K_PCI_MEM_SIZE 0x10000 |