diff options
author | Anders Broman <anders.broman@ericsson.com> | 2010-01-13 20:32:01 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2010-01-13 20:32:01 +0000 |
commit | 440c3f9261af41a397823a80121cfa0122df1c88 (patch) | |
tree | 64b368c46b53e0e8f52e80f61ed17e13d64596a5 /epan/dissectors/packet-fcp.c | |
parent | 6343ffb68e3e7ea3b335ad5e443e23f324a99d35 (diff) |
From Didier Gautheron:
check_col.diff
Remove redundant calls to check_col() if it guards only one columns function with one parameter after the column type.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394
svn path=/trunk/; revision=31519
Diffstat (limited to 'epan/dissectors/packet-fcp.c')
-rw-r--r-- | epan/dissectors/packet-fcp.c | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/epan/dissectors/packet-fcp.c b/epan/dissectors/packet-fcp.c index e88095f105..4c34ba2180 100644 --- a/epan/dissectors/packet-fcp.c +++ b/epan/dissectors/packet-fcp.c @@ -202,63 +202,49 @@ dissect_task_mgmt_flags (packet_info *pinfo, proto_tree *parent_tree, tvbuff_t * proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_obsolete, tvb, offset, 1, flags); if (flags&0x80){ proto_item_append_text(item, " OBSOLETE"); - if(check_col(pinfo->cinfo, COL_INFO)){ - col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP OBSOLETE] "); - } + col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP OBSOLETE] "); } flags&=(~( 0x80 )); proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_clear_aca, tvb, offset, 1, flags); if (flags&0x40){ proto_item_append_text(item, " CLEAR ACA"); - if(check_col(pinfo->cinfo, COL_INFO)){ - col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP CLEAR_ACA] "); - } + col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP CLEAR_ACA] "); } flags&=(~( 0x40 )); proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_target_reset, tvb, offset, 1, flags); if (flags&0x20){ proto_item_append_text(item, " TARGET RESET"); - if(check_col(pinfo->cinfo, COL_INFO)){ - col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP TARGET_RESET] "); - } + col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP TARGET_RESET] "); } flags&=(~( 0x20 )); proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_lu_reset, tvb, offset, 1, flags); if (flags&0x10){ proto_item_append_text(item, " LU RESET"); - if(check_col(pinfo->cinfo, COL_INFO)){ - col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP LU_RESET] "); - } + col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP LU_RESET] "); } flags&=(~( 0x10 )); proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_rsvd, tvb, offset, 1, flags); if (flags&0x08){ proto_item_append_text(item, " RSVD"); - if(check_col(pinfo->cinfo, COL_INFO)){ - col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP RSVD] "); - } + col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP RSVD] "); } flags&=(~( 0x08 )); proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_clear_task_set, tvb, offset, 1, flags); if (flags&0x04){ proto_item_append_text(item, " CLEAR TASK SET"); - if(check_col(pinfo->cinfo, COL_INFO)){ - col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP CLEAR_TASK_SET] "); - } + col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP CLEAR_TASK_SET] "); } flags&=(~( 0x04 )); proto_tree_add_boolean(tree, hf_fcp_mgmt_flags_abort_task_set, tvb, offset, 1, flags); if (flags&0x02){ proto_item_append_text(item, " ABORT TASK SET"); - if(check_col(pinfo->cinfo, COL_INFO)){ - col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP ABORT_TASK_SET] "); - } + col_prepend_fence_fstr(pinfo->cinfo, COL_INFO, "[FCP ABORT_TASK_SET] "); } flags&=(~( 0x02 )); |