From 0f0c111119811cf1c6c9353efdaaef302aca5930 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Fri, 14 Jun 2013 01:02:11 +0000 Subject: Remove check_col() and the occasional tree. svn path=/trunk/; revision=49920 --- epan/dissectors/packet-fcdns.c | 42 +++++++++++++++++------------------------- 1 file changed, 17 insertions(+), 25 deletions(-) (limited to 'epan/dissectors/packet-fcdns.c') diff --git a/epan/dissectors/packet-fcdns.c b/epan/dissectors/packet-fcdns.c index 6b754d2236..0039262e7c 100644 --- a/epan/dissectors/packet-fcdns.c +++ b/epan/dissectors/packet-fcdns.c @@ -1462,12 +1462,10 @@ dissect_fcdns (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) cthdr.maxres_size = g_ntohs (cthdr.maxres_size); /* Determine the type of server the request/response is for */ - if (check_col(pinfo->cinfo, COL_PROTOCOL)) { - if (cthdr.gstype == FCCT_GSTYPE_DIRSVC) - col_set_str (pinfo->cinfo, COL_PROTOCOL, "dNS"); - else - col_set_str (pinfo->cinfo, COL_PROTOCOL, "Unzoned NS"); - } + if (cthdr.gstype == FCCT_GSTYPE_DIRSVC) + col_set_str (pinfo->cinfo, COL_PROTOCOL, "dNS"); + else + col_set_str (pinfo->cinfo, COL_PROTOCOL, "Unzoned NS"); if (tree) { if (cthdr.gstype == FCCT_GSTYPE_DIRSVC) { @@ -1514,10 +1512,8 @@ dissect_fcdns (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) g_hash_table_insert (fcdns_req_hash, req_key, cdata); } - if (check_col (pinfo->cinfo, COL_INFO)) { - col_add_str (pinfo->cinfo, COL_INFO, val_to_str (opcode, fc_dns_opcode_val, + col_add_str (pinfo->cinfo, COL_INFO, val_to_str (opcode, fc_dns_opcode_val, "0x%x")); - } } else { /* Opcode is ACC or RJT */ @@ -1526,12 +1522,10 @@ dissect_fcdns (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) pinfo->rxid, NO_PORT2); isreq = 0; if (!conversation) { - if (tree && (opcode == FCCT_MSG_ACC)) { - if (check_col (pinfo->cinfo, COL_INFO)) { - col_add_str (pinfo->cinfo, COL_INFO, + if (opcode == FCCT_MSG_ACC) { + col_add_str (pinfo->cinfo, COL_INFO, val_to_str (opcode, fc_dns_opcode_val, "0x%x")); - } /* No record of what this accept is for. Can't decode */ proto_tree_add_text (fcdns_tree, tvb, 0, -1, "No record of Exchg. Unable to decode MSG_ACC/RJT"); @@ -1551,18 +1545,16 @@ dissect_fcdns (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) failed_opcode = cdata->opcode; } - if (check_col (pinfo->cinfo, COL_INFO)) { - if (opcode != FCCT_MSG_RJT) { - col_add_fstr (pinfo->cinfo, COL_INFO, "ACC (%s)", - val_to_str (opcode, fc_dns_opcode_val, - "0x%x")); - } - else { - col_add_fstr (pinfo->cinfo, COL_INFO, "RJT (%s)", - val_to_str (failed_opcode, - fc_dns_opcode_val, - "0x%x")); - } + if (opcode != FCCT_MSG_RJT) { + col_add_fstr (pinfo->cinfo, COL_INFO, "ACC (%s)", + val_to_str (opcode, fc_dns_opcode_val, + "0x%x")); + } + else { + col_add_fstr (pinfo->cinfo, COL_INFO, "RJT (%s)", + val_to_str (failed_opcode, + fc_dns_opcode_val, + "0x%x")); } if (tree) { -- cgit v1.2.3