X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/abc8c2d61c65757011d9d32abb01cd1e51232f3a..refs/heads/coverity_scan:/print-tipc.c diff --git a/print-tipc.c b/print-tipc.c index 3a9897ef..ec5f1a54 100644 --- a/print-tipc.c +++ b/print-tipc.c @@ -27,14 +27,11 @@ * https://web.archive.org/web/20161025110514/http://tipc.sourceforge.net/doc/tipc_message_formats.html */ -#ifdef HAVE_CONFIG_H #include -#endif #include "netdissect-stdinc.h" #include "netdissect.h" -#include "ethertype.h" #include "extract.h" @@ -170,7 +167,6 @@ print_payload(netdissect_options *ndo, const struct payload_tipc_pkthdr *ap) u_int orig_node; u_int dest_node; - ND_TCHECK_4(ap->dest_port); w0 = GET_BE_U_4(ap->w0); user = TIPC_USER(w0); hsize = TIPC_HSIZE(w0); @@ -211,10 +207,6 @@ print_payload(netdissect_options *ndo, const struct payload_tipc_pkthdr *ap) broadcast_ack, link_ack, link_seq); } } - return; - -trunc: - nd_print_trunc(ndo); } static void @@ -239,7 +231,6 @@ print_internal(netdissect_options *ndo, const struct internal_tipc_pkthdr *ap) u_int msg_cnt; u_int link_tol; - ND_TCHECK_4(ap->dest_node); w0 = GET_BE_U_4(ap->w0); user = TIPC_USER(w0); hsize = TIPC_HSIZE(w0); @@ -257,7 +248,6 @@ print_internal(netdissect_options *ndo, const struct internal_tipc_pkthdr *ap) tok2str(tipcmtype_values, "Unknown", mtype), w1); if (ndo->ndo_vflag) { - ND_TCHECK_SIZE(ap); seq_gap = TIPC_SEQ_GAP(w1); broadcast_ack = TIPC_BROADCAST_ACK(w1); w2 = GET_BE_U_4(ap->w2); @@ -279,10 +269,6 @@ print_internal(netdissect_options *ndo, const struct internal_tipc_pkthdr *ap) last_sent_frag, next_sent_frag, trans_seq, msg_cnt, link_tol); } - return; - -trunc: - nd_print_trunc(ndo); } static void @@ -299,7 +285,6 @@ print_link_conf(netdissect_options *ndo, const struct link_conf_tipc_pkthdr *ap) u_int ntwrk_id; u_int media_id; - ND_TCHECK_4(ap->prev_node); w0 = GET_BE_U_4(ap->w0); user = TIPC_USER(w0); hsize = TIPC_HSIZE(w0); @@ -317,7 +302,6 @@ print_link_conf(netdissect_options *ndo, const struct link_conf_tipc_pkthdr *ap) tok2str(tipcuser_values, "unknown", user), tok2str(tipc_linkconf_mtype_values, "Unknown", mtype)); if (ndo->ndo_vflag) { - ND_TCHECK_4(ap->w5); node_sig = TIPC_NODE_SIG(w1); ntwrk_id = GET_BE_U_4(ap->ntwrk_id); w5 = GET_BE_U_4(ap->w5); @@ -325,10 +309,6 @@ print_link_conf(netdissect_options *ndo, const struct link_conf_tipc_pkthdr *ap) ND_PRINT("\n\tNodeSignature %u, network_id %u, media_id %u", node_sig, ntwrk_id, media_id); } - return; - -trunc: - nd_print_trunc(ndo); } void @@ -344,8 +324,7 @@ tipc_print(netdissect_options *ndo, const u_char *bp, u_int length _U_, w0 = GET_BE_U_4(ap->w0); user = TIPC_USER(w0); - switch (user) - { + switch (user) { case TIPC_USER_LOW_IMPORTANCE: case TIPC_USER_MEDIUM_IMPORTANCE: case TIPC_USER_HIGH_IMPORTANCE: