diff options
author | krj <krj@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-05-19 08:37:29 +0000 |
---|---|---|
committer | krj <krj@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-05-19 08:37:29 +0000 |
commit | 229be5d0d0fab44869874cdf37a56f1a1f06c719 (patch) | |
tree | 615092d4bd06d42218e02db68c6b7050afaf898e /epan/dissectors/packet-btl2cap.c | |
parent | 068d799c3aaf16100c4e13a4011297774671d2fe (diff) |
Remove a couple of check_col()
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32896 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-btl2cap.c')
-rw-r--r-- | epan/dissectors/packet-btl2cap.c | 66 |
1 files changed, 28 insertions, 38 deletions
diff --git a/epan/dissectors/packet-btl2cap.c b/epan/dissectors/packet-btl2cap.c index 371ab49283..52d1a0bd46 100644 --- a/epan/dissectors/packet-btl2cap.c +++ b/epan/dissectors/packet-btl2cap.c @@ -841,22 +841,20 @@ static void dissect_i_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, control = tvb_get_letohs(tvb, offset); segment = (control & 0xC000) >> 14; - if(check_col(pinfo->cinfo, COL_INFO)){ - switch(segment) - { - case 0: - col_append_str(pinfo->cinfo, COL_INFO, "[I] Unsegmented SDU"); - break; - case 1: - col_append_str(pinfo->cinfo, COL_INFO, "[I] Start SDU"); - break; - case 2: - col_append_str(pinfo->cinfo, COL_INFO, "[I] End SDU"); - break; - case 3: - col_append_str(pinfo->cinfo, COL_INFO, "[I] Continuation SDU"); - break; - } + switch(segment) + { + case 0: + col_append_str(pinfo->cinfo, COL_INFO, "[I] Unsegmented SDU"); + break; + case 1: + col_append_str(pinfo->cinfo, COL_INFO, "[I] Start SDU"); + break; + case 2: + col_append_str(pinfo->cinfo, COL_INFO, "[I] End SDU"); + break; + case 3: + col_append_str(pinfo->cinfo, COL_INFO, "[I] Continuation SDU"); + break; } ti_control = proto_tree_add_none_format(btl2cap_tree, hf_btl2cap_control, tvb, offset, 2, "Control: %s reqseq:%d r:%d txseq:%d", @@ -903,9 +901,7 @@ static void dissect_i_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item; item=proto_tree_add_uint(btl2cap_tree, hf_btl2cap_reassembled_in, tvb, 0, 0, mfp->last_frame); PROTO_ITEM_SET_GENERATED(item); - if (check_col(pinfo->cinfo, COL_INFO)){ - col_append_fstr(pinfo->cinfo, COL_INFO, "[Reassembled in #%u] ", mfp->last_frame); - } + col_append_fstr(pinfo->cinfo, COL_INFO, "[Reassembled in #%u] ", mfp->last_frame); } } else { length -= 4; /*Control, FCS*/ @@ -925,9 +921,7 @@ static void dissect_i_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, proto_item *item; item=proto_tree_add_uint(btl2cap_tree, hf_btl2cap_continuation_to, tvb, 0, 0, mfp->first_frame); PROTO_ITEM_SET_GENERATED(item); - if (check_col(pinfo->cinfo, COL_INFO)){ - col_append_fstr(pinfo->cinfo, COL_INFO, "[Continuation to #%u] ", mfp->first_frame); - } + col_append_fstr(pinfo->cinfo, COL_INFO, "[Continuation to #%u] ", mfp->first_frame); } } if(segment == 0x02 && mfp && mfp->last_frame==pinfo->fd->num){ @@ -967,19 +961,17 @@ static void dissect_s_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree guint16 control; control = tvb_get_letohs(tvb, offset); - if(check_col(pinfo->cinfo, COL_INFO)){ - switch((control & 0x000C) >> 2) - { - case 0: - col_append_str(pinfo->cinfo, COL_INFO, "[S] Receiver Ready"); - break; - case 1: - col_append_str(pinfo->cinfo, COL_INFO, "[S] Reject"); - break; - default: - col_append_str(pinfo->cinfo, COL_INFO, "[S] Unknown supervisory frame"); - break; - } + switch((control & 0x000C) >> 2) + { + case 0: + col_append_str(pinfo->cinfo, COL_INFO, "[S] Receiver Ready"); + break; + case 1: + col_append_str(pinfo->cinfo, COL_INFO, "[S] Reject"); + break; + default: + col_append_str(pinfo->cinfo, COL_INFO, "[S] Unknown supervisory frame"); + break; } ti_control = proto_tree_add_none_format(btl2cap_tree, hf_btl2cap_control, tvb, offset, 2, "Control: %s reqseq:%d r:%d", @@ -1017,9 +1009,7 @@ static void dissect_btl2cap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) void* pd_save; col_set_str(pinfo->cinfo, COL_PROTOCOL, "L2CAP"); - if(check_col(pinfo->cinfo, COL_INFO)){ - col_set_str(pinfo->cinfo, COL_INFO, pinfo->p2p_dir == P2P_DIR_SENT ? "Sent " : "Rcvd "); - } + col_set_str(pinfo->cinfo, COL_INFO, pinfo->p2p_dir == P2P_DIR_SENT ? "Sent " : "Rcvd "); if(tree){ ti=proto_tree_add_item(tree, proto_btl2cap, tvb, offset, -1, FALSE); |