From 440c3f9261af41a397823a80121cfa0122df1c88 Mon Sep 17 00:00:00 2001 From: Anders Broman Date: Wed, 13 Jan 2010 20:32:01 +0000 Subject: 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 --- epan/dissectors/packet-rpcap.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'epan/dissectors/packet-rpcap.c') diff --git a/epan/dissectors/packet-rpcap.c b/epan/dissectors/packet-rpcap.c index 8910818f20..3b3a79cc62 100644 --- a/epan/dissectors/packet-rpcap.c +++ b/epan/dissectors/packet-rpcap.c @@ -776,15 +776,11 @@ dissect_rpcap_packet (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree, if (!info_added) { /* Only indicate when not added before */ - if (check_col (pinfo->cinfo, COL_PROTOCOL)) { - /* Indicate RPCAP in the protocol column */ - col_prepend_fence_fstr(pinfo->cinfo, COL_PROTOCOL, "R|"); - } - - if (check_col (pinfo->cinfo, COL_INFO)) { - /* Indicate RPCAP in the info column */ - col_prepend_fence_fstr (pinfo->cinfo, COL_INFO, "Remote | "); - } + /* Indicate RPCAP in the protocol column */ + col_prepend_fence_fstr(pinfo->cinfo, COL_PROTOCOL, "R|"); + + /* Indicate RPCAP in the info column */ + col_prepend_fence_fstr (pinfo->cinfo, COL_INFO, "Remote | "); info_added = TRUE; register_frame_end_routine(rpcap_frame_end); } @@ -811,8 +807,7 @@ dissect_rpcap (tvbuff_t *tvb, packet_info *pinfo, proto_tree *top_tree) guint16 msg_value; guint32 plen; - if (check_col (pinfo->cinfo, COL_PROTOCOL)) - col_set_str (pinfo->cinfo, COL_PROTOCOL, PSNAME); + col_set_str (pinfo->cinfo, COL_PROTOCOL, PSNAME); col_clear(pinfo->cinfo, COL_INFO); -- cgit v1.2.3