summaryrefslogtreecommitdiff
path: root/print-ether.c
diff options
context:
space:
mode:
authorDenis Ovsienko <infrastation@yandex.ru>2014-03-26 13:08:22 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2014-03-26 15:49:27 +0400
commitd6af516cbc7c874404cb07456a6e80a8e9ddd9b4 (patch)
tree52828124908adb5e860f0da0e4dbcb8c51e595e5 /print-ether.c
parentea256d91381ac0ebb3d159511b3e78d4dff0b917 (diff)
downloadtcpdump-d6af516cbc7c874404cb07456a6e80a8e9ddd9b4.tar.gz
finalize some previous NDO conversions
Eliminate a number of fputs(), putchar() and fflush() uses. Justify preprocessor directives. Don't typecast ND_PRINT() to void and fix some indentation.
Diffstat (limited to 'print-ether.c')
-rw-r--r--print-ether.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/print-ether.c b/print-ether.c
index 231c0728..09b9baba 100644
--- a/print-ether.c
+++ b/print-ether.c
@@ -93,26 +93,26 @@ ether_hdr_print(netdissect_options *ndo,
ep = (const struct ether_header *)bp;
- (void)ND_PRINT((ndo, "%s > %s",
+ ND_PRINT((ndo, "%s > %s",
etheraddr_string(ESRC(ep)),
etheraddr_string(EDST(ep))));
ether_type = EXTRACT_16BITS(&ep->ether_type);
if (!ndo->ndo_qflag) {
if (ether_type <= ETHERMTU)
- (void)ND_PRINT((ndo, ", 802.3"));
+ ND_PRINT((ndo, ", 802.3"));
else
- (void)ND_PRINT((ndo, ", ethertype %s (0x%04x)",
+ ND_PRINT((ndo, ", ethertype %s (0x%04x)",
tok2str(ethertype_values,"Unknown", ether_type),
ether_type));
} else {
if (ether_type <= ETHERMTU)
- (void)ND_PRINT((ndo, ", 802.3"));
+ ND_PRINT((ndo, ", 802.3"));
else
- (void)ND_PRINT((ndo, ", %s", tok2str(ethertype_values,"Unknown Ethertype (0x%04x)", ether_type)));
+ ND_PRINT((ndo, ", %s", tok2str(ethertype_values,"Unknown Ethertype (0x%04x)", ether_type)));
}
- (void)ND_PRINT((ndo, ", length %u: ", length));
+ ND_PRINT((ndo, ", length %u: ", length));
}
/*
@@ -341,7 +341,7 @@ ethertype_print(netdissect_options *ndo,
case ETHERTYPE_ATALK:
if (ndo->ndo_vflag)
- fputs("et1 ", stdout);
+ ND_PRINT((ndo, "et1 "));
atalk_print(/*ndo,*/p, length);
return (1);