aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tns.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-06-14 02:50:46 +0000
committerMichael Mann <mmann78@netscape.net>2013-06-14 02:50:46 +0000
commitdfa2156e301539929a12dda54752c778c3ee7a39 (patch)
tree8257c41ad55ad71cd0fe15d0464fb82ba2c0f509 /epan/dissectors/packet-tns.c
parente9a5b16a09484d0b3ba5401ef23402c022b82de6 (diff)
Remove check_col() and the occasional tree.
svn path=/trunk/; revision=49923
Diffstat (limited to 'epan/dissectors/packet-tns.c')
-rw-r--r--epan/dissectors/packet-tns.c45
1 files changed, 15 insertions, 30 deletions
diff --git a/epan/dissectors/packet-tns.c b/epan/dissectors/packet-tns.c
index c88a8cbb4d..fb006d8bcf 100644
--- a/epan/dissectors/packet-tns.c
+++ b/epan/dissectors/packet-tns.c
@@ -290,24 +290,18 @@ static void dissect_tns_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
}
offset += 2;
- if ( check_col(pinfo->cinfo, COL_INFO) )
+ if ( is_sns )
{
- if ( is_sns )
- {
- col_append_str(pinfo->cinfo, COL_INFO, ", SNS");
- }
- else
- {
- col_append_str(pinfo->cinfo, COL_INFO, ", Data");
- }
+ col_append_str(pinfo->cinfo, COL_INFO, ", SNS");
}
-
- if ( data_tree )
+ else
{
- call_dissector(data_handle,
- tvb_new_subset_remaining(tvb, offset), pinfo, data_tree);
+ col_append_str(pinfo->cinfo, COL_INFO, ", Data");
}
+ call_dissector(data_handle,
+ tvb_new_subset_remaining(tvb, offset), pinfo, data_tree);
+
return;
}
@@ -736,16 +730,13 @@ static void dissect_tns_marker(tvbuff_t *tvb, int offset, packet_info *pinfo,
PROTO_ITEM_SET_HIDDEN(hidden_item);
}
- if ( check_col(pinfo->cinfo, COL_INFO) )
+ if ( is_attention )
{
- if ( is_attention )
- {
- col_append_str(pinfo->cinfo, COL_INFO, ", Marker");
- }
- else
- {
- col_append_str(pinfo->cinfo, COL_INFO, ", Attention");
- }
+ col_append_str(pinfo->cinfo, COL_INFO, ", Marker");
+ }
+ else
+ {
+ col_append_str(pinfo->cinfo, COL_INFO, ", Attention");
}
if ( marker_tree )
@@ -884,11 +875,8 @@ dissect_tns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_set_str(pinfo->cinfo, COL_PROTOCOL, "TNS");
- if (check_col(pinfo->cinfo, COL_INFO))
- {
- col_set_str(pinfo->cinfo, COL_INFO,
+ col_set_str(pinfo->cinfo, COL_INFO,
(pinfo->match_uint == pinfo->destport) ? "Request" : "Response");
- }
if (tree)
{
@@ -931,11 +919,8 @@ dissect_tns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
offset += 1;
- if ( check_col(pinfo->cinfo, COL_INFO))
- {
- col_append_fstr(pinfo->cinfo, COL_INFO, ", %s (%u)",
+ col_append_fstr(pinfo->cinfo, COL_INFO, ", %s (%u)",
val_to_str_const(type, tns_type_vals, "Unknown"), type);
- }
if ( tree )
{