From: mcr Date: Fri, 23 Apr 2004 19:03:39 +0000 (+0000) Subject: do not use gcc-ism for macro, instead abuse C-syntax X-Git-Tag: tcpdump-3.9.1~387 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/f1fa25bfefac7dd95768d949ef0ef232c4540331 do not use gcc-ism for macro, instead abuse C-syntax --- diff --git a/netdissect.h b/netdissect.h index f995af81..bc3fac0d 100644 --- a/netdissect.h +++ b/netdissect.h @@ -21,7 +21,7 @@ * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.5 2004-04-05 04:27:41 mcr Exp $ (LBL) + * @(#) $Header: /tcpdump/master/tcpdump/netdissect.h,v 1.6 2004-04-23 19:03:39 mcr Exp $ (LBL) */ #ifndef netdissect_h @@ -196,7 +196,7 @@ struct netdissect_options { /* Bail if "var" was not captured */ #define ND_TCHECK(var) ND_TCHECK2(var, sizeof(var)) -#define ND_PRINT(fmt, args...) (*ndo->ndo_printf)(ndo, fmt, ##args) +#define ND_PRINT(STUFF) (*ndo->ndo_printf)STUFF #if 0 extern void ts_print(netdissect_options *ipdo, diff --git a/print-eap.c b/print-eap.c index 34712e2d..95a2c97e 100644 --- a/print-eap.c +++ b/print-eap.c @@ -22,7 +22,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-eap.c,v 1.2 2004-04-05 22:35:36 guy Exp $"; + "@(#) $Header: /tcpdump/master/tcpdump/print-eap.c,v 1.3 2004-04-23 19:03:39 mcr Exp $"; #endif #ifdef HAVE_CONFIG_H @@ -59,8 +59,8 @@ eap_print(netdissect_options *ndo, eap = (const struct eap_packet_t *)cp; ND_TCHECK(eap->data); - ND_PRINT("EAP code=%u id=%u length=%u ", - eap->code, eap->id, (eap->length[0]<<8) + eap->length[1]); + ND_PRINT((ndo, "EAP code=%u id=%u length=%u ", + eap->code, eap->id, (eap->length[0]<<8) + eap->length[1])); if (!ndo->ndo_vflag) return;