From: Francois-Xavier Le Bail Date: Wed, 31 Jan 2018 07:30:40 +0000 (+0100) Subject: Remove unneeded '&' when getting a pointer to a nd_ipv4 type X-Git-Tag: tcpdump-4.99-bp~1301^2~1 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/77ece6d435c77c3bf1ff221e295408ca268444df Remove unneeded '&' when getting a pointer to a nd_ipv4 type --- diff --git a/print-eigrp.c b/print-eigrp.c index 706a9c43..9e0a7669 100644 --- a/print-eigrp.c +++ b/print-eigrp.c @@ -362,7 +362,8 @@ eigrp_print(netdissect_options *ndo, const u_char *pptr, u_int len) if (EXTRACT_BE_U_4(tlv_ptr.eigrp_tlv_ip_int->nexthop) == 0) ND_PRINT("self"); else - ND_PRINT("%s",ipaddr_string(ndo, &tlv_ptr.eigrp_tlv_ip_int->nexthop)); + ND_PRINT("%s", + ipaddr_string(ndo, tlv_ptr.eigrp_tlv_ip_int->nexthop)); ND_PRINT("\n\t delay %u ms, bandwidth %u Kbps, mtu %u, hop %u, reliability %u, load %u", (EXTRACT_BE_U_4(tlv_ptr.eigrp_tlv_ip_int->delay)/100), @@ -396,10 +397,11 @@ eigrp_print(netdissect_options *ndo, const u_char *pptr, u_int len) if (EXTRACT_BE_U_4(tlv_ptr.eigrp_tlv_ip_ext->nexthop) == 0) ND_PRINT("self"); else - ND_PRINT("%s",ipaddr_string(ndo, &tlv_ptr.eigrp_tlv_ip_ext->nexthop)); + ND_PRINT("%s", + ipaddr_string(ndo, tlv_ptr.eigrp_tlv_ip_ext->nexthop)); ND_PRINT("\n\t origin-router %s, origin-as %u, origin-proto %s, flags [0x%02x], tag 0x%08x, metric %u", - ipaddr_string(ndo, &tlv_ptr.eigrp_tlv_ip_ext->origin_router), + ipaddr_string(ndo, tlv_ptr.eigrp_tlv_ip_ext->origin_router), EXTRACT_BE_U_4(tlv_ptr.eigrp_tlv_ip_ext->origin_as), tok2str(eigrp_ext_proto_id_values,"unknown",EXTRACT_U_1(tlv_ptr.eigrp_tlv_ip_ext->proto_id)), EXTRACT_U_1(tlv_ptr.eigrp_tlv_ip_ext->flags), diff --git a/print-juniper.c b/print-juniper.c index 1d12d6a3..d1f9a663 100644 --- a/print-juniper.c +++ b/print-juniper.c @@ -557,8 +557,8 @@ juniper_es_if_print(netdissect_options *ndo, tok2str(juniper_ipsec_type_values,"Unknown",EXTRACT_U_1(ih->type)), EXTRACT_U_1(ih->type), EXTRACT_BE_U_4(ih->spi), - ipaddr_string(ndo, &ih->src_ip), - ipaddr_string(ndo, &ih->dst_ip), + ipaddr_string(ndo, ih->src_ip), + ipaddr_string(ndo, ih->dst_ip), l2info.length); } else { ND_PRINT("ES SA, index %u, ttl %u type %s (%u), length %u\n", diff --git a/print-ldp.c b/print-ldp.c index 4f89186a..2803aa33 100644 --- a/print-ldp.c +++ b/print-ldp.c @@ -593,7 +593,7 @@ ldp_pdu_print(netdissect_options *ndo, /* print the LSR-ID, label-space & length */ ND_PRINT("%sLDP, Label-Space-ID: %s:%u, pdu-length: %u", (ndo->ndo_vflag < 1) ? "" : "\n\t", - ipaddr_string(ndo, &ldp_com_header->lsr_id), + ipaddr_string(ndo, ldp_com_header->lsr_id), EXTRACT_BE_U_2(ldp_com_header->label_space), pdu_len); diff --git a/print-msnlb.c b/print-msnlb.c index 997341e0..3d201fa3 100644 --- a/print-msnlb.c +++ b/print-msnlb.c @@ -57,8 +57,8 @@ msnlb_print(netdissect_options *ndo, const u_char *bp) ND_PRINT("MS NLB heartbeat, host priority: %u,", EXTRACT_LE_U_4((hb->host_prio))); - ND_PRINT(" cluster IP: %s,", ipaddr_string(ndo, &(hb->virtual_ip))); - ND_PRINT(" host IP: %s", ipaddr_string(ndo, &(hb->host_ip))); + ND_PRINT(" cluster IP: %s,", ipaddr_string(ndo, hb->virtual_ip)); + ND_PRINT(" host IP: %s", ipaddr_string(ndo, hb->host_ip)); return; trunc: ND_PRINT("[|MS NLB]"); diff --git a/print-rip.c b/print-rip.c index 50557c4d..2c361355 100644 --- a/print-rip.c +++ b/print-rip.c @@ -205,13 +205,13 @@ rip_entry_print_v1(netdissect_options *ndo, const u_char *p, } if (family == 0) { ND_PRINT("\n\t AFI 0, %s, metric: %u", - ipaddr_string(ndo, &ni->rip_dest), + ipaddr_string(ndo, ni->rip_dest), EXTRACT_BE_U_4(ni->rip_metric)); return (RIP_ROUTELEN); } /* BSD_AFNUM_INET */ ND_PRINT("\n\t %s, metric: %u", - ipaddr_string(ndo, &ni->rip_dest), - EXTRACT_BE_U_4(ni->rip_metric)); + ipaddr_string(ndo, ni->rip_dest), + EXTRACT_BE_U_4(ni->rip_metric)); return (RIP_ROUTELEN); } @@ -267,12 +267,12 @@ rip_entry_print_v2(netdissect_options *ndo, const u_char *p, return (0); ND_PRINT("\n\t AFI %s, %15s/%-2d, tag 0x%04x, metric: %u, next-hop: ", tok2str(bsd_af_values, "%u", family), - ipaddr_string(ndo, &ni->rip_dest), - mask2plen(EXTRACT_BE_U_4(ni->rip_dest_mask)), + ipaddr_string(ndo, ni->rip_dest), + mask2plen(EXTRACT_BE_U_4(ni->rip_dest_mask)), EXTRACT_BE_U_2(ni->rip_tag), EXTRACT_BE_U_4(ni->rip_metric)); if (EXTRACT_BE_U_4(ni->rip_router)) - ND_PRINT("%s", ipaddr_string(ndo, &ni->rip_router)); + ND_PRINT("%s", ipaddr_string(ndo, ni->rip_router)); else ND_PRINT("self"); }