diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-01-07 11:47:30 +0100 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2018-01-07 13:36:41 +0100 |
commit | e2982e7f6f0b624a773ec5a58885ee80fab46d34 (patch) | |
tree | 52c8e511ccaff8ef09dc3337b213273865522162 /print-ppi.c | |
parent | 8ab5c3a4e75a3ce8da691cd6ca6a9945082827af (diff) | |
download | tcpdump-e2982e7f6f0b624a773ec5a58885ee80fab46d34.tar.gz |
Update ND_PRINT() as a variadic macro
Diffstat (limited to 'print-ppi.c')
-rw-r--r-- | print-ppi.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/print-ppi.c b/print-ppi.c index 9cd5fc1e..ad5eb27f 100644 --- a/print-ppi.c +++ b/print-ppi.c @@ -39,14 +39,14 @@ ppi_header_print(netdissect_options *ndo, const u_char *bp, u_int length) dltname = pcap_datalink_val_to_name(dlt); if (!ndo->ndo_qflag) { - ND_PRINT((ndo, "V.%d DLT %s (%d) len %d", hdr->ppi_ver, + ND_PRINT("V.%d DLT %s (%d) len %d", hdr->ppi_ver, (dltname != NULL ? dltname : "UNKNOWN"), dlt, - len)); + len); } else { - ND_PRINT((ndo, "%s", (dltname != NULL ? dltname : "UNKNOWN"))); + ND_PRINT("%s", (dltname != NULL ? dltname : "UNKNOWN")); } - ND_PRINT((ndo, ", length %u: ", length)); + ND_PRINT(", length %u: ", length); } static u_int @@ -63,7 +63,7 @@ ppi_print(netdissect_options *ndo, struct pcap_pkthdr nhdr; if (caplen < sizeof(ppi_header_t)) { - ND_PRINT((ndo, "[|ppi]")); + ND_PRINT("[|ppi]"); return (caplen); } @@ -74,11 +74,11 @@ ppi_print(netdissect_options *ndo, * If we don't have the entire PPI header, don't * bother. */ - ND_PRINT((ndo, "[|ppi]")); + ND_PRINT("[|ppi]"); return (caplen); } if (len < sizeof(ppi_header_t)) { - ND_PRINT((ndo, "[|ppi]")); + ND_PRINT("[|ppi]"); return (len); } dlt = EXTRACT_LE_U_4(&hdr->ppi_dlt); |