diff options
author | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2019-04-21 20:21:06 +0200 |
---|---|---|
committer | Francois-Xavier Le Bail <devel.fx.lebail@orange.fr> | 2019-04-21 20:21:06 +0200 |
commit | 1b081ef03b1880d40813807589dc966e2549b4c5 (patch) | |
tree | 61c43f89513bc2abdcdb07f2eb1e1d7927f38b23 | |
parent | 1b30fb060a3fb06a364bb86b0c7f9b485f43b77c (diff) | |
download | tcpdump-1b081ef03b1880d40813807589dc966e2549b4c5.tar.gz |
Remove some unneeded '&' when getting a pointer to a nd_ type
Moreover:
Remove some unneeded casts.
-rw-r--r-- | print-bootp.c | 2 | ||||
-rw-r--r-- | print-bt.c | 2 | ||||
-rw-r--r-- | print-pptp.c | 20 | ||||
-rw-r--r-- | print-stp.c | 10 |
4 files changed, 17 insertions, 17 deletions
diff --git a/print-bootp.c b/print-bootp.c index 89bd59be..95d5d73b 100644 --- a/print-bootp.c +++ b/print-bootp.c @@ -1055,7 +1055,7 @@ trunc: nd_print_trunc(ndo); } -#define PRINTCMUADDR(m, s) { ND_TCHECK_4(&cmu->m); \ +#define PRINTCMUADDR(m, s) { ND_TCHECK_4(cmu->m); \ if (GET_IPV4_TO_NETWORK_ORDER(cmu->m) != 0) \ ND_PRINT(" %s:%s", s, ipaddr_string(ndo, cmu->m)); } @@ -60,7 +60,7 @@ bt_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h, const u_char * caplen -= BT_HDRLEN; length -= BT_HDRLEN; p += BT_HDRLEN; - ND_TCHECK_4(&hdr->direction); + ND_TCHECK_4(hdr->direction); if (ndo->ndo_eflag) ND_PRINT(", hci length %u, direction %s", length, (GET_BE_U_4(hdr->direction)&0x1) ? "in" : "out"); diff --git a/print-pptp.c b/print-pptp.c index b2adc1d9..d6992de4 100644 --- a/print-pptp.c +++ b/print-pptp.c @@ -546,9 +546,9 @@ pptp_sccrq_print(netdissect_options *ndo, pptp_max_channel_print(ndo, &ptr->max_channel); ND_TCHECK_2(ptr->firm_rev); pptp_firm_rev_print(ndo, &ptr->firm_rev); - ND_TCHECK_SIZE(&ptr->hostname); + ND_TCHECK_SIZE(ptr->hostname); pptp_hostname_print(ndo, &ptr->hostname[0]); - ND_TCHECK_SIZE(&ptr->vendor); + ND_TCHECK_SIZE(ptr->vendor); pptp_vendor_print(ndo, &ptr->vendor[0]); return; @@ -577,9 +577,9 @@ pptp_sccrp_print(netdissect_options *ndo, pptp_max_channel_print(ndo, &ptr->max_channel); ND_TCHECK_2(ptr->firm_rev); pptp_firm_rev_print(ndo, &ptr->firm_rev); - ND_TCHECK_SIZE(&ptr->hostname); + ND_TCHECK_SIZE(ptr->hostname); pptp_hostname_print(ndo, &ptr->hostname[0]); - ND_TCHECK_SIZE(&ptr->vendor); + ND_TCHECK_SIZE(ptr->vendor); pptp_vendor_print(ndo, &ptr->vendor[0]); return; @@ -705,9 +705,9 @@ pptp_ocrq_print(netdissect_options *ndo, ND_PRINT(" PHONE_NO_LEN(%u)", GET_BE_U_2(ptr->phone_no_len)); ND_TCHECK_2(ptr->reserved1); PRINT_RESERVED_IF_NOT_ZERO_2(ptr->reserved1); - ND_TCHECK_SIZE(&ptr->phone_no); + ND_TCHECK_SIZE(ptr->phone_no); ND_PRINT(" PHONE_NO(%.64s)", ptr->phone_no); - ND_TCHECK_SIZE(&ptr->subaddr); + ND_TCHECK_SIZE(ptr->subaddr); pptp_subaddr_print(ndo, &ptr->subaddr[0]); return; @@ -765,11 +765,11 @@ pptp_icrq_print(netdissect_options *ndo, ND_PRINT(" DIALED_NO_LEN(%u)", GET_BE_U_2(ptr->dialed_no_len)); ND_TCHECK_2(ptr->dialing_no_len); ND_PRINT(" DIALING_NO_LEN(%u)", GET_BE_U_2(ptr->dialing_no_len)); - ND_TCHECK_SIZE(&ptr->dialed_no); + ND_TCHECK_SIZE(ptr->dialed_no); ND_PRINT(" DIALED_NO(%.64s)", ptr->dialed_no); - ND_TCHECK_SIZE(&ptr->dialing_no); + ND_TCHECK_SIZE(ptr->dialing_no); ND_PRINT(" DIALING_NO(%.64s)", ptr->dialing_no); - ND_TCHECK_SIZE(&ptr->subaddr); + ND_TCHECK_SIZE(ptr->subaddr); pptp_subaddr_print(ndo, &ptr->subaddr[0]); return; @@ -863,7 +863,7 @@ pptp_cdn_print(netdissect_options *ndo, pptp_cause_code_print(ndo, &ptr->cause_code); ND_TCHECK_2(ptr->reserved1); PRINT_RESERVED_IF_NOT_ZERO_2(ptr->reserved1); - ND_TCHECK_SIZE(&ptr->call_stats); + ND_TCHECK_SIZE(ptr->call_stats); ND_PRINT(" CALL_STATS(%.128s)", ptr->call_stats); return; diff --git a/print-stp.c b/print-stp.c index b22c5375..54eb70bc 100644 --- a/print-stp.c +++ b/print-stp.c @@ -113,7 +113,7 @@ stp_print_config_bpdu(netdissect_options *ndo, const struct stp_bpdu_ *stp_bpdu, ND_TCHECK_2(stp_bpdu->port_id); ND_PRINT(", bridge-id %s.%04x, length %u", - stp_print_bridge_id(ndo, (const u_char *)&stp_bpdu->bridge_id), + stp_print_bridge_id(ndo, stp_bpdu->bridge_id), GET_BE_U_2(stp_bpdu->port_id), length); /* in non-verbose mode just print the bridge-id */ @@ -130,7 +130,7 @@ stp_print_config_bpdu(netdissect_options *ndo, const struct stp_bpdu_ *stp_bpdu, (float) GET_BE_U_2(stp_bpdu->forward_delay) / STP_TIME_BASE); ND_PRINT("\n\troot-id %s, root-pathcost %u", - stp_print_bridge_id(ndo, (const u_char *)&stp_bpdu->root_id), + stp_print_bridge_id(ndo, stp_bpdu->root_id), GET_BE_U_4(stp_bpdu->root_path_cost)); /* Port role is only valid for 802.1w */ @@ -270,12 +270,12 @@ stp_print_mstp_bpdu(netdissect_options *ndo, const struct stp_bpdu_ *stp_bpdu, ND_TCHECK_4(stp_bpdu->root_path_cost); ND_PRINT("CIST root-id %s, CIST ext-pathcost %u", - stp_print_bridge_id(ndo, (const u_char *)&stp_bpdu->root_id), + stp_print_bridge_id(ndo, stp_bpdu->root_id), GET_BE_U_4(stp_bpdu->root_path_cost)); - ND_TCHECK_SIZE(&stp_bpdu->bridge_id); + ND_TCHECK_SIZE(stp_bpdu->bridge_id); ND_PRINT("\n\tCIST regional-root-id %s, ", - stp_print_bridge_id(ndo, (const u_char *)&stp_bpdu->bridge_id)); + stp_print_bridge_id(ndo, stp_bpdu->bridge_id)); ND_TCHECK_2(stp_bpdu->port_id); ND_PRINT("CIST port-id %04x,", GET_BE_U_2(stp_bpdu->port_id)); |