diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-04-05 20:04:52 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-04-05 20:04:52 +0000 |
commit | d628112766251175e7bca838a503e507fb2c7718 (patch) | |
tree | 486aa000656218e8390a9a31345c7d45e33cc062 /plugins/m2m | |
parent | 55ddda26894975b798d7daa90e538c67a433d26c (diff) |
Get rid of a bunch of check_col().
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32388 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'plugins/m2m')
-rw-r--r-- | plugins/m2m/packet-m2m.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/plugins/m2m/packet-m2m.c b/plugins/m2m/packet-m2m.c index a5ecd14d4c..2aeee687bb 100644 --- a/plugins/m2m/packet-m2m.c +++ b/plugins/m2m/packet-m2m.c @@ -216,10 +216,7 @@ static void dissect_m2m(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) tlv_len = get_tlv_length(&m2m_tlv_info); if(tlv_type == -1 || tlv_len > 64000 || tlv_len < 1) { /* invalid tlv info */ - if (check_col(pinfo->cinfo, COL_INFO)) - { - col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", "M2M TLV error"); - } + col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", "M2M TLV error"); /* display the invalid TLV in HEX */ proto_tree_add_item(m2m_tree, hf_wimax_invalid_tlv, tvb, offset, (length - offset), FALSE); break; @@ -426,20 +423,17 @@ static void pdu_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint gint pdu_length = 0; /* update the info column */ - if (check_col(pinfo->cinfo, COL_INFO)) + switch (frag_type) { - switch (frag_type) - { - case TLV_FIRST_FRAG: - col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "First TLV Fragment (%d)", frag_number); - break; - case TLV_LAST_FRAG: - col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "Last TLV Fragment (%d)", frag_number); - break; - case TLV_MIDDLE_FRAG: - col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "Middle TLV Fragment %d", frag_number); - break; - } + case TLV_FIRST_FRAG: + col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "First TLV Fragment (%d)", frag_number); + break; + case TLV_LAST_FRAG: + col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "Last TLV Fragment (%d)", frag_number); + break; + case TLV_MIDDLE_FRAG: + col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "Middle TLV Fragment %d", frag_number); + break; } if(frag_type == TLV_NO_FRAG) { /* not fragmented PDU */ @@ -462,8 +456,7 @@ static void pdu_burst_decoder(proto_tree *tree, tvbuff_t *tvb, gint offset, gint pdu_tvb = NULL; if(frag_type == TLV_LAST_FRAG) { /* update the info column */ - if (check_col(pinfo->cinfo, COL_INFO)) - col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", "Incomplete PDU frame"); + col_append_sep_str(pinfo->cinfo, COL_INFO, ", ", "Incomplete PDU frame"); } } } |