From Didier Gautheron:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 13 Jan 2010 20:32:01 +0000 (20:32 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 13 Jan 2010 20:32:01 +0000 (20:32 +0000)
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

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31519 f5534014-38df-0310-8fa8-9805f1628bb7

76 files changed:
asn1/goose/packet-goose-template.c
asn1/ulp/ulp.cnf
epan/dissectors/packet-ajp13.c
epan/dissectors/packet-alcap.c
epan/dissectors/packet-ansi_637.c
epan/dissectors/packet-ansi_683.c
epan/dissectors/packet-ansi_801.c
epan/dissectors/packet-asap.c
epan/dissectors/packet-bittorrent.c
epan/dissectors/packet-btl2cap.c
epan/dissectors/packet-btrfcomm.c
epan/dissectors/packet-calcappprotocol.c
epan/dissectors/packet-cisco-erspan.c
epan/dissectors/packet-dcerpc.c
epan/dissectors/packet-dcp-etsi.c
epan/dissectors/packet-ddtp.c
epan/dissectors/packet-dec-dnart.c
epan/dissectors/packet-dect.c
epan/dissectors/packet-dis.c
epan/dissectors/packet-distcc.c
epan/dissectors/packet-dtls.c
epan/dissectors/packet-enrp.c
epan/dissectors/packet-extreme.c
epan/dissectors/packet-fcp.c
epan/dissectors/packet-fip.c
epan/dissectors/packet-fractalgeneratorprotocol.c
epan/dissectors/packet-gsm_sms.c
epan/dissectors/packet-h223.c
epan/dissectors/packet-h225.c
epan/dissectors/packet-h245.c
epan/dissectors/packet-h282.c
epan/dissectors/packet-h283.c
epan/dissectors/packet-h501.c
epan/dissectors/packet-homeplug.c
epan/dissectors/packet-iax2.c
epan/dissectors/packet-imf.c
epan/dissectors/packet-infiniband.c
epan/dissectors/packet-l2tp.c
epan/dissectors/packet-lapd.c
epan/dissectors/packet-loop.c
epan/dissectors/packet-manolito.c
epan/dissectors/packet-mgcp.c
epan/dissectors/packet-netbios.c
epan/dissectors/packet-pagp.c
epan/dissectors/packet-pingpongprotocol.c
epan/dissectors/packet-pw-atm.c
epan/dissectors/packet-pw-satop.c
epan/dissectors/packet-qllc.c
epan/dissectors/packet-redback.c
epan/dissectors/packet-redbackli.c
epan/dissectors/packet-rlm.c
epan/dissectors/packet-ros.c
epan/dissectors/packet-rpcap.c
epan/dissectors/packet-rtp-events.c
epan/dissectors/packet-sabp.c
epan/dissectors/packet-scriptingservice.c
epan/dissectors/packet-sdp.c
epan/dissectors/packet-tapa.c
epan/dissectors/packet-tivoconnect.c
epan/dissectors/packet-tnef.c
epan/dissectors/packet-tzsp.c
epan/dissectors/packet-uts.c
epan/dissectors/packet-wtp.c
epan/dissectors/packet-x25.c
epan/dissectors/packet-xml.c
epan/dissectors/packet-xot.c
epan/dissectors/packet-zbee-zdp.c
epan/dissectors/packet-zrtp.c
epan/wslua/wslua_pinfo.c
plugins/irda/packet-irda.c
plugins/profinet/packet-dcom-cba-acco.c
plugins/profinet/packet-pn-dcp.c
plugins/profinet/packet-pn-mrrt.c
plugins/profinet/packet-pn-ptcp.c
plugins/profinet/packet-pn-rt.c
plugins/wimaxasncp/packet-wimaxasncp.c

index 01996bf7d49ec7b34f7f0c5c9bab18a7d8277034..be64c659154d2cdd801cc78acfbf3db803f74026 100644 (file)
@@ -78,8 +78,7 @@ dissect_goose(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
                item = proto_tree_add_item(parent_tree, proto_goose, tvb, 0, -1, FALSE);
                tree = proto_item_add_subtree(item, ett_goose);
        }
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, PNAME);
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, PNAME);
        col_clear(pinfo->cinfo, COL_INFO);
 
        /* APPID */
index 72179ac12fcc5185b750ee2d3ed25fa92e3da0c9..2375f9b381a072b9493fb902f1d5519699ee5e45 100644 (file)
@@ -28,10 +28,8 @@ SETId/min  minsi
 #.FN_HDR ULP-PDU
        proto_tree_add_item(tree, proto_ulp, tvb, 0, -1, FALSE);
 
-       if (check_col(actx->pinfo->cinfo, COL_PROTOCOL)) 
-               col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, PSNAME);
-       if (check_col(actx->pinfo->cinfo, COL_INFO))
-               col_clear(actx->pinfo->cinfo, COL_INFO);
+       col_set_str(actx->pinfo->cinfo, COL_PROTOCOL, PSNAME);
+       col_clear(actx->pinfo->cinfo, COL_INFO);
 #.END
 
 #.FN_BODY UlpMessage  VAL_PTR = &UlpMessage
index 685b2fd28a3ca4cb1940eb2fb56c8faec3b319f1..8efe28b922bb32fa87f932527a692c478b34368f 100644 (file)
@@ -296,8 +296,7 @@ display_rsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ajp13_tree, ajp13_con
     proto_tree_add_string(ajp13_tree, hf_ajp13_code, tvb, pos, 1, mcode_buf);
   pos+=1;
 
-  if(check_col(pinfo->cinfo, COL_INFO))
-    col_append_str(pinfo->cinfo, COL_INFO, msg_code);
+  col_append_str(pinfo->cinfo, COL_INFO, msg_code);
 
   if (mcode == 5) {
     if (ajp13_tree)
@@ -525,8 +524,7 @@ display_req_forward(tvbuff_t *tvb, packet_info *pinfo,
       mcode_buf=ep_strdup_printf("(%d) %s", meth, meth_code);
       proto_tree_add_string(ajp13_tree, hf_ajp13_method, tvb, pos, 1, mcode_buf);
     }
-    if(check_col(pinfo->cinfo, COL_INFO))
-      col_append_str(pinfo->cinfo, COL_INFO, meth_code);
+    col_append_str(pinfo->cinfo, COL_INFO, meth_code);
     pos+=1;
   }
 
index 23f541ec9b7d05edf5096e23909bf3a3c4bb1aea..01d720e35559d570a0804fad24749aef23a501e8 100644 (file)
@@ -1373,8 +1373,7 @@ static void dissect_alcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
     proto_tree* compat_tree;
     const alcap_msg_type_info_t* msg_type;
     
-    if (check_col(pinfo->cinfo, COL_PROTOCOL))
-        col_set_str(pinfo->cinfo, COL_PROTOCOL, alcap_proto_name_short);
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, alcap_proto_name_short);
     
     if (tree) {
         proto_item *alcap_item = proto_tree_add_item(tree, proto_alcap, tvb, 0, -1, FALSE);
@@ -1391,9 +1390,7 @@ static void dissect_alcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
     
     expert_add_info_format(pinfo, pi, PI_RESPONSE_CODE, msg_type->severity, " ");
     
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_set_str(pinfo->cinfo, COL_INFO, msg_type->abbr);
-    
+    col_set_str(pinfo->cinfo, COL_INFO, msg_type->abbr);
     
     pi = proto_tree_add_item(alcap_tree,hf_alcap_compat,tvb,5,1,FALSE);
     compat_tree = proto_item_add_subtree(pi,ett_compat);
index 7ac3815b4a6f6c941163a37841173ae613f6a6b2..671ecee2616f16936b818d5644db6a7af5fb002f 100644 (file)
@@ -1961,10 +1961,7 @@ dissect_ansi_637_tele(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     const gchar        *str = NULL;
     guint32    value;
 
-    if (check_col(pinfo->cinfo, COL_PROTOCOL))
-    {
-       col_set_str(pinfo->cinfo, COL_PROTOCOL, ansi_proto_name_short);
-    }
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, ansi_proto_name_short);
 
     /* In the interest of speed, if "tree" is NULL, don't do any work not
      * necessary to generate protocol tree items.
@@ -2142,10 +2139,7 @@ dissect_ansi_637_trans(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     guint8     oct;
     guint8     len;
 
-    if (check_col(pinfo->cinfo, COL_PROTOCOL))
-    {
-       col_set_str(pinfo->cinfo, COL_PROTOCOL, ansi_proto_name_short);
-    }
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, ansi_proto_name_short);
 
     /* In the interest of speed, if "tree" is NULL, don't do any work not
      * necessary to generate protocol tree items.
index 16ac06ea0e5eeb43182132b1d41079bda139732a..827d3295601f3547e1db8cb0775e117398fa00eb 100644 (file)
@@ -4758,10 +4758,7 @@ dissect_ansi_683(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     g_pinfo = pinfo;
 
-    if (check_col(pinfo->cinfo, COL_PROTOCOL))
-    {
-       col_set_str(pinfo->cinfo, COL_PROTOCOL, ansi_proto_name_short);
-    }
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, ansi_proto_name_short);
 
     /* In the interest of speed, if "tree" is NULL, don't do any work not
      * necessary to generate protocol tree items.
index 248e66c2e9984988a648429f31f3a6857179ce24..72685e1d898ffef8a9957946f052f543fdb71f0b 100644 (file)
@@ -2455,10 +2455,7 @@ dissect_ansi_801(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     g_pinfo = pinfo;
 
-    if (check_col(pinfo->cinfo, COL_PROTOCOL))
-    {
-       col_set_str(pinfo->cinfo, COL_PROTOCOL, ansi_proto_name_short);
-    }
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, ansi_proto_name_short);
 
     /* In the interest of speed, if "tree" is NULL, don't do any work not
      * necessary to generate protocol tree items.
index 5b6fd070df35247d99c86b3c4fede90d4d0a197c..ef4a96cec07ac2189f4a002f11c68d82531bc3e0 100644 (file)
@@ -839,7 +839,7 @@ dissect_asap(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
   proto_tree *asap_tree;
 
   /* pinfo is NULL only if dissect_asap is called from dissect_error cause */
-  if (pinfo && (check_col(pinfo->cinfo, COL_PROTOCOL)))
+  if (pinfo)
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "ASAP");
 
   /* In the interest of speed, if "tree" is NULL, don't do any work not
index 3abf6aa4351f4446b6641d7acd0d348d70062a11..b1c174fcd02e56c277a73b94e37023dc54fd67bf 100644 (file)
@@ -663,9 +663,7 @@ static void dissect_bittorrent_message (tvbuff_t *tvb, packet_info *pinfo, proto
      offset += 1;
      length -= 1;
    }
-   if (check_col(pinfo->cinfo, COL_INFO)) {
-      col_set_str(pinfo->cinfo, COL_INFO, msgtype);
-   }
+   col_set_str(pinfo->cinfo, COL_INFO, msgtype);
 
    switch (type) {
    case BITTORRENT_MESSAGE_CHOKE:
index 09e5bcd84f382e6de3097444b8002b3de1e30ad3..371ab4928367f37767cee63e7065ec26950fc3a2 100644 (file)
@@ -1070,137 +1070,104 @@ static void dissect_btl2cap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                        case 0x01: /* Command Reject */
                                offset=dissect_comrej(tvb, offset, pinfo, btl2cap_cmd_tree);
                                proto_item_append_text(ti_command, "Command Reject");
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Command Reject");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Command Reject");
                                break;
 
                        case 0x02: /* Connection Request */
                                offset=dissect_connrequest(tvb, offset, pinfo, btl2cap_cmd_tree);
                                proto_item_append_text(ti_command, "Connection Request");
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Connection Request");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Connection Request");
                                break;
 
                        case 0x03: /* Connection Response */
                                offset=dissect_connresponse(tvb, offset, pinfo, btl2cap_cmd_tree);
                                proto_item_append_text(ti_command, "Connection Response");
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Connection Response");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Connection Response");
                                break;
+
                        case 0x04: /* Configure Request */
                                offset=dissect_configrequest(tvb, offset, pinfo, btl2cap_cmd_tree, cmd_length);
                                proto_item_append_text(ti_command, "Configure Request");
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Configure Request");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Configure Request");
                                break;
 
                        case 0x05: /* Configure Response */
                                offset=dissect_configresponse(tvb, offset, pinfo, btl2cap_cmd_tree, cmd_length);
                                proto_item_append_text(ti_command, "Configure Response");
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Configure Response");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Configure Response");
                                break;
 
                        case 0x06: /* Disconnect Request */
                                offset=dissect_disconnrequestresponse(tvb, offset, pinfo, btl2cap_cmd_tree);
                                proto_item_append_text(ti_command, "Disconnect Request");
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Disconnect Request");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Disconnect Request");
                                break;
 
                        case 0x07: /* Disconnect Response */
                                offset=dissect_disconnrequestresponse(tvb, offset, pinfo, btl2cap_cmd_tree);   
                                proto_item_append_text(ti_command, "Disconnect Response");
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Disconnect Response");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Disconnect Response");
                                break;    
 
                        case 0x08: /* Echo Request */
                                proto_item_append_text(ti_command, "Echo Request");
                                offset+=tvb_length_remaining(tvb, offset);
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Echo Request");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Echo Request");
                                break;
 
                        case 0x09: /* Echo Response */
                                proto_item_append_text(ti_command, "Echo Response");
                                offset+=tvb_length_remaining(tvb, offset);
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Echo Response");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Echo Response");
                                break;
 
                        case 0x0a: /* Information Request */
                                offset=dissect_inforequest(tvb, offset, pinfo, btl2cap_cmd_tree);
 
                                proto_item_append_text(ti_command, "Information Request");
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Information Request");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Information Request");
                                break;
 
                        case 0x0b: /* Information Response */
                                offset=dissect_inforesponse(tvb, offset, pinfo, btl2cap_cmd_tree);
                                proto_item_append_text(ti_command, "Information Response");
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Information Response");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Information Response");
                                break;
 
                        case 0x0c: /* Create Channel Request */
                                offset=dissect_chanrequest(tvb, offset, pinfo, btl2cap_cmd_tree);
                                proto_item_append_text(ti_command, "Create Channel Request");
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Create Channel Request");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Create Channel Request");
                                break;
 
                        case 0x0d: /* Create Channel Response */
                                offset=dissect_chanresponse(tvb, offset, pinfo, btl2cap_cmd_tree);
                                proto_item_append_text(ti_command, "Create Channel Response");
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Create Channel Response");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Create Channel Response");
                                break;
 
                        case 0x0e: /* Move Channel Request */
                                offset=dissect_movechanrequest(tvb, offset, pinfo, btl2cap_cmd_tree);
                                proto_item_append_text(ti_command, "Move Channel Request");
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Move Channel Request");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Move Channel Request");
                                break;
 
                        case 0x0f: /* Move Channel Response */
                                offset=dissect_movechanresponse(tvb, offset, pinfo, btl2cap_cmd_tree);
                                proto_item_append_text(ti_command, "Move Channel Response");
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Move Channel Response");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Move Channel Response");
                                break;
 
                        case 0x10: /* Move Channel Confirmation */
                                offset=dissect_movechanconfirmation(tvb, offset, pinfo, btl2cap_cmd_tree);
                                proto_item_append_text(ti_command, "Move Channel Confirmation");
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Move Channel Confirmation");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Move Channel Confirmation");
                                break;
 
                        case 0x11: /* Move Channel Confirmation Response */
                                offset=dissect_movechanconfirmationresponse(tvb, offset, pinfo, btl2cap_cmd_tree);
                                proto_item_append_text(ti_command, "Move Channel Confirmation Response");
-                               if ((check_col(pinfo->cinfo, COL_INFO))){
-                                       col_append_str(pinfo->cinfo, COL_INFO, "Move Channel Confirmation Response");
-                               }
+                               col_append_str(pinfo->cinfo, COL_INFO, "Move Channel Confirmation Response");
                                break;
 
                                default:
index 07ccea0ad791a11212b8f31d3b32011e004621f1..a58ab5e01d651d02d5fe017fff80b08dbbe2dcbc 100644 (file)
@@ -657,9 +657,7 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
        /* UID frame */
        if(frame_type==0xef && dlci && pf_flag) {
-               if ((check_col(pinfo->cinfo, COL_INFO))){
-                       col_append_str(pinfo->cinfo, COL_INFO, "UID ");
-               }
+               col_append_str(pinfo->cinfo, COL_INFO, "UID ");
                if((dlci_state->do_credit_fc&0x03)==0x03){
 /*QQQ use tvb_length_remaining()==2 and !frame_len as heuristics to catch this as well? */
                        /* add credit based flow control byte */
@@ -679,9 +677,7 @@ dissect_btrfcomm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                guint8 mcc_cr_flag, mcc_ea_flag;
                int start_offset=offset;
 
-               if ((check_col(pinfo->cinfo, COL_INFO))){
-                       col_append_str(pinfo->cinfo, COL_INFO, "MPX_CTRL ");
-               }
+               col_append_str(pinfo->cinfo, COL_INFO, "MPX_CTRL ");
 
                mcc_ti = proto_tree_add_text(rfcomm_tree, tvb, offset, 1, "Multiplexer Control Command");
                ctrl_tree = proto_item_add_subtree(mcc_ti, ett_btrfcomm_ctrl);
index fa69b47f5646c9b8f291336f8f3b163b2c44994a..d12213bddbc46cc60c8acc7a412c4a30c7caba31 100644 (file)
@@ -116,7 +116,7 @@ dissect_calcappprotocol(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *t
   proto_tree *calcappprotocol_tree;
 
   /* pinfo is NULL only if dissect_calcappprotocol_message is called from dissect_error cause */
-  if (pinfo && (check_col(pinfo->cinfo, COL_PROTOCOL)))
+  if (pinfo)
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "CalcAppProtocol");
 
   /* In the interest of speed, if "tree" is NULL, don't do any work not
index 4cc00f45563d075eb2d036060dbde465fa510902..e4f61f6b10ad83ad4aae28c1f779f8b13dd50529 100644 (file)
@@ -92,10 +92,8 @@ dissect_erspan(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        tvbuff_t *eth_tvb;
        guint32 offset = 0;
 
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_SHORT_NAME);
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_set_str(pinfo->cinfo, COL_INFO, PROTO_SHORT_NAME ":");
+        col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_SHORT_NAME);
+        col_set_str(pinfo->cinfo, COL_INFO, PROTO_SHORT_NAME ":");
 
        if (tree) {
                ti = proto_tree_add_item(tree, proto_erspan, tvb, offset, -1,
index 9dde6f7ca49b808bdf521d97ac6a50d007756e06..383e023c7e39471a539e3385f89d3951f6eb3fbd 100644 (file)
@@ -2317,9 +2317,7 @@ dcerpc_try_handoff (packet_info *pinfo, proto_tree *tree,
     if (!name)
         name = "Unknown?!";
 
-    if (check_col (pinfo->cinfo, COL_PROTOCOL)) {
-        col_set_str (pinfo->cinfo, COL_PROTOCOL, sub_proto->name);
-    }
+    col_set_str (pinfo->cinfo, COL_PROTOCOL, sub_proto->name);
 
     if (check_col (pinfo->cinfo, COL_INFO)) {
         col_add_fstr (pinfo->cinfo, COL_INFO, "%s %s",
@@ -4846,8 +4844,7 @@ dissect_dcerpc_dg (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
 
     col_set_str (pinfo->cinfo, COL_PROTOCOL, "DCERPC");
-    if (check_col (pinfo->cinfo, COL_INFO))
-        col_add_str (pinfo->cinfo, COL_INFO, pckt_vals[hdr.ptype].strptr);
+    col_add_str (pinfo->cinfo, COL_INFO, pckt_vals[hdr.ptype].strptr);
 
     tvb_memcpy (tvb, (guint8 *)hdr.drep, offset, sizeof (hdr.drep));
     offset += sizeof (hdr.drep);
index 28d46c141193c46f96167ac9ea8da02308fa16fc..43568679b8ee8635c233475862e014b6e3259f8f 100644 (file)
@@ -184,10 +184,8 @@ dissect_dcp_etsi (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
 
   /* Clear out stuff in the info column */
   col_clear(pinfo->cinfo, COL_INFO);
-  if (check_col (pinfo->cinfo, COL_PROTOCOL)) {
-    col_set_str (pinfo->cinfo, COL_PROTOCOL, "DCP (ETSI)");
+  col_set_str (pinfo->cinfo, COL_PROTOCOL, "DCP (ETSI)");
     /*col_append_fstr (pinfo->cinfo, COL_INFO, " tvb %d", tvb_length(tvb));*/
-  }
 
   if(tree) {
     proto_item *ti = NULL;
index 64a3c6f3126867c2061a63473c44dc2c63cce60a..ce2dc5ecad79c355baaf868b480a50e4bf1c844e 100644 (file)
@@ -102,14 +102,11 @@ dissect_ddtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
            return 0;
     }
 
-    if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
-       /* Indicate what kind of message this is. */
-       col_set_str (pinfo->cinfo, COL_PROTOCOL, "DDTP");
-    }
-    if (check_col(pinfo->cinfo, COL_INFO)) {
-       /* In case we throw an exception below. */
-       col_clear (pinfo->cinfo, COL_INFO);
-    }
+    /* Indicate what kind of message this is. */
+    col_set_str (pinfo->cinfo, COL_PROTOCOL, "DDTP");
+    /* In case we throw an exception below. */
+    col_clear (pinfo->cinfo, COL_INFO);
+
     if (tree) {
        ti = proto_tree_add_item(tree, proto_ddtp, tvb, 0, -1, FALSE);
        ddtp_tree = proto_item_add_subtree(ti, ett_ddtp);
index ee3036bf2c18abc8e8f1716ccaf212b5bc82a928..cbfb87f026cf0997d7be31c8fd132f0140f4b2c9 100644 (file)
@@ -552,12 +552,9 @@ dissect_dec_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
             nsp_msg_tree, hf_dec_rt_dst_node, tvb, offset, 2, TRUE);
         offset += 2;
         if (nsp_msg_type == CONN_ACK_MSG) {
-            if (check_col(pinfo->cinfo, COL_INFO)) {
-                col_set_str(pinfo->cinfo, COL_INFO,
-                  "NSP connect acknowledgement");
-                /* Done with this msg type */
-                return;
-            }
+            col_set_str(pinfo->cinfo, COL_INFO, "NSP connect acknowledgement");
+            /* Done with this msg type */
+            return;
         }
         /* All other messages have a source node */
         src_node_local = tvb_get_letohs(tvb, offset);
index 7971ab11c728345f63b86eefa58218a039cab363..b33c74ea777105321fa445b372103f3fec3598d6 100644 (file)
@@ -1231,38 +1231,26 @@ dissect_bfield(gboolean dect_packet_type _U_, guint8 a_header,
                blen=40;
                xcrclen=4;
 
-               if(check_col(pinfo->cinfo, COL_INFO /*Type1*/))
-               {
-                       col_append_str(pinfo->cinfo, COL_INFO /*Type1*/, "Full Slot");
-               }
+               col_append_str(pinfo->cinfo, COL_INFO /*Type1*/, "Full Slot");
                break;
        case 2:
                blen=100;
                xcrclen=4;
 
-               if(check_col(pinfo->cinfo, COL_INFO /*Type1*/))
-               {
-                       col_append_str(pinfo->cinfo, COL_INFO /*Type1*/, "Double Slot");
-               }
+               col_append_str(pinfo->cinfo, COL_INFO /*Type1*/, "Double Slot");
                break;
        case 4:
                blen=10;
                xcrclen=4;
 
-               if(check_col(pinfo->cinfo, COL_INFO /*Type1*/))
-               {
-                       col_append_str(pinfo->cinfo, COL_INFO /*Type1*/, "Half Slot");
-               }
+               col_append_str(pinfo->cinfo, COL_INFO /*Type1*/, "Half Slot");
                break;
        case 7:
        default:
                blen=0;
                xcrclen=0;
 
-               if(check_col(pinfo->cinfo, COL_INFO /*Type1*/))
-               {
-                       col_append_str(pinfo->cinfo, COL_INFO /*Type1*/, "No B-Field");
-               }
+               col_append_str(pinfo->cinfo, COL_INFO /*Type1*/, "No B-Field");
                break;
 
        }
@@ -1429,8 +1417,7 @@ dissect_decttype(gboolean dect_packet_type, struct dect_afield *pkt_afield,
                {
                case 0:         /* Static System Info */
                case 1:
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Static System Info");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Static System Info");
 
                        proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_0_Nr, tvb, offset, 1, FALSE);
                        proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_0_Sn, tvb, offset, 1, FALSE);
@@ -1460,12 +1447,10 @@ dissect_decttype(gboolean dect_packet_type, struct dect_afield *pkt_afield,
                        offset-=5;
                        break;
                case 2:         /* Extended RF Carriers Part 1 */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Extended RF Carriers Part 1");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Extended RF Carriers Part 1");
                        break;
                case 3:         /* Fixed Part Capabilities */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Fixed Part Capabilities");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Fixed Part Capabilities");
 
                        proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A12, tvb, offset, 1, FALSE);
                        proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_3_A13, tvb, offset, 1, FALSE);
@@ -1519,8 +1504,7 @@ dissect_decttype(gboolean dect_packet_type, struct dect_afield *pkt_afield,
                        offset-=5;
                        break;
                case 4:         /* Extended Fixed Part Capabilities */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Extended Fixed Part Capabilities");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Extended Fixed Part Capabilities");
 
                        proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_CRFPHops, tvb, offset, 1, FALSE);
                        proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_4_CRFPEnc, tvb, offset, 1, FALSE);
@@ -1573,12 +1557,10 @@ dissect_decttype(gboolean dect_packet_type, struct dect_afield *pkt_afield,
                        offset-=5;
                        break;
                case 5:         /* SARI List Contents */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "SARI List Contents");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "SARI List Contents");
                        break;
                case 6:         /* Multi-Frame No. */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Multi-Frame No.");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Multi-Frame No.");
 
                        proto_tree_add_item(ATail, hf_dect_A_Tail_Qt_6_Spare, tvb, offset, 2, FALSE);
                        offset+=2;
@@ -1590,34 +1572,27 @@ dissect_decttype(gboolean dect_packet_type, struct dect_afield *pkt_afield,
                        offset-=5;
                        break;
                case 7:         /* Escape */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Escape");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Escape");
                        break;
                case 8:         /* Obsolete */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Obsolete");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Obsolete");
                        break;
                case 9:         /* Extended RF Carriers Part 2 */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Extended RF Carriers Part 2");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Extended RF Carriers Part 2");
                        break;
                case 10:        /* Reserved(?) */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Reserved(?)");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Reserved(?)");
                        break;
                case 11:        /* Transmit Information(?) */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Transmit Information(?)");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Transmit Information(?)");
                        break;
                case 12:        /* Extended Fixed Part Capabilities 2 */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Extended Fixed Part Capabilities 2");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Extended Fixed Part Capabilities 2");
                        break;
                case 13:
                case 14:
                case 15:
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Reserved");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Reserved");
                        break;
                }
        }
@@ -1633,8 +1608,7 @@ dissect_decttype(gboolean dect_packet_type, struct dect_afield *pkt_afield,
                switch(tail_0>>4)
                {
                case 0:         /* Basic Connection Control */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Basic Connection Control");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Basic Connection Control");
                        proto_tree_add_item(ATail, hf_dect_A_Tail_Mt_BasicConCtrl, tvb, offset, 1, FALSE);
                        offset++;
 
@@ -1656,24 +1630,19 @@ dissect_decttype(gboolean dect_packet_type, struct dect_afield *pkt_afield,
                        offset-=5;
                        break;
                case 1:         /* Advanced Connection Control */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Advanced Connection Control");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Advanced Connection Control");
                        break;
                case 2:         /* MAC Layer Test Messages */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "MAC Layer Test Messages");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "MAC Layer Test Messages");
                        break;
                case 3:         /* Quality Control */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Quality Control");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Quality Control");
                        break;
                case 4:         /* Broadcast and Connectionless Services */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Broadcast and Connectionless Services");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Broadcast and Connectionless Services");
                        break;
                case 5:         /* Encryption Control */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Encryption Control");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Encryption Control");
 
                        proto_tree_add_item(ATail, hf_dect_A_Tail_Mt_Encr_Cmd1, tvb, offset, 1, FALSE);
                        proto_tree_add_item(ATail, hf_dect_A_Tail_Mt_Encr_Cmd2, tvb, offset, 1, FALSE);
@@ -1689,20 +1658,16 @@ dissect_decttype(gboolean dect_packet_type, struct dect_afield *pkt_afield,
                        offset-=5;
                        break;
                case 6:         /* Tail for use with the first Transmission of a B-Field \"bearer request\" Message */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Tail for use with the first Transmission of a B-Field \"bearer request\" Message");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Tail for use with the first Transmission of a B-Field \"bearer request\" Message");
                        break;
                case 7:         /* Escape */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Escape");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Escape");
                        break;
                case 8:         /* TARI Message */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "TARI Message");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "TARI Message");
                        break;
                case 9:         /* REP Connection Control */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "REP Connection Control");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "REP Connection Control");
                        break;
                case 10:        /* Reserved */
                case 11:
@@ -1710,8 +1675,7 @@ dissect_decttype(gboolean dect_packet_type, struct dect_afield *pkt_afield,
                case 13:
                case 14:
                case 15:
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Reserved");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Reserved");
                        break;
                }
        }
@@ -1730,8 +1694,7 @@ dissect_decttype(gboolean dect_packet_type, struct dect_afield *pkt_afield,
 XXX: Hier weitermachen
 #endif
                        {
-                               if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Zero Length Page: ");
+                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Zero Length Page: ");
                                proto_tree_add_uint_format(atailti, hf_dect_A_Tail_Pt_InfoType, tvb, offset, 3, 0x2323, "RFPI:xxxxx%.1x%.2x%.2x", (pkt_afield->Tail[0]&0x0f), pkt_afield->Tail[1], pkt_afield->Tail[2]);
                                offset+=3;
 
@@ -1739,8 +1702,7 @@ XXX: Hier weitermachen
                        }
                        else
                        {
-                               if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Short Page: ");
+                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Short Page: ");
                                proto_tree_add_uint_format(atailti, hf_dect_A_Tail_Pt_InfoType, tvb, offset, 3, 0x2323, "Bs Data:%.1x%.2x%.2x", (pkt_afield->Tail[0]&0x0f), pkt_afield->Tail[1], pkt_afield->Tail[2]);
                                offset+=3;
 
@@ -1802,28 +1764,22 @@ XXX: Hier weitermachen
                        offset-=5;
                        break;
                case 2:         /* Full Page */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Full Page: ");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Full Page: ");
                        break;
                case 3:         /* MAC Resume Page */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "MAC Resume Page: ");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "MAC Resume Page: ");
                        break;
                case 4:         /* Not the Last 36 Bits of a Long Page */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Not the Last 36 Bits: ");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "Not the Last 36 Bits: ");
                        break;
                case 5:         /* The First 36 Bits of a Long Page */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "The First 36 Bits: ");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "The First 36 Bits: ");
                        break;
                case 6:         /* The Last 36 Bits of a Long Page */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "The Last 36 Bits: ");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "The Last 36 Bits: ");
                        break;
                case 7:         /* All of a Long Page */
-                       if(check_col(pinfo->cinfo, COL_INFO /*Type2*/))
-                               col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "All of a Long Page: ");
+                       col_append_str(pinfo->cinfo, COL_INFO /*Type2*/, "All of a Long Page: ");
                        break;
                }
        }
index 72e882a49af09ccee58058c01e54899c81b68660..e164f7a954f53cfce3a26ea4cf44d9413011def5 100644 (file)
@@ -94,10 +94,7 @@ static gint dissect_dis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     protocolFamily = DIS_PROTOCOLFAMILY_OTHER;
     persistentObjectPduType = DIS_PERSISTENT_OBJECT_TYPE_OTHER;
 
-    if (check_col(pinfo->cinfo, COL_PROTOCOL))
-    {
-        col_set_str(pinfo->cinfo, COL_PROTOCOL, dis_proto_name_short);
-    }
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, dis_proto_name_short);
 
     /* Add the top-level DIS node under which the rest of the fields will be
      * displayed.
index 08c8b3ee50dd6828cb9bedd705ed0b09bd90f364..34cc87e8fd8f6366832a7d715dba212ce70bf255 100644 (file)
@@ -70,9 +70,7 @@ extern void proto_reg_handoff_distcc(void);
 #define CHECK_PDU_LEN(x) \
        if(parameter>tvb_length_remaining(tvb, offset) || parameter < 1){\
                len=tvb_length_remaining(tvb, offset);\
-               if (check_col(pinfo->cinfo, COL_INFO)) {\
-                       col_append_str(pinfo->cinfo, COL_INFO, "[Short" x " PDU]");\
-               }\
+               col_append_str(pinfo->cinfo, COL_INFO, "[Short" x " PDU]");\
        } \
        tvb_ensure_bytes_exist(tvb, offset, len);
 
index aa12826199df52a310cdc0ed4913d7f5540eb7df..6aae2d63c227a73b9fa4fb436d093fc065e82709 100644 (file)
@@ -413,8 +413,7 @@ dissect_dtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       /* on second and subsequent records per frame
        * add a delimiter on info column
        */
-      if (!first_record_in_frame
-          && check_col(pinfo->cinfo, COL_INFO))
+      if (!first_record_in_frame)
         {
           col_append_str(pinfo->cinfo, COL_INFO, ", ");
         }
index f568796750ad21219c59c7faeb1976358154fa95..706055ba8172e32657cf364888f7d9a7b604708e 100644 (file)
@@ -997,7 +997,7 @@ dissect_enrp(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
   proto_tree *enrp_tree;
 
   /* pinfo is NULL only if dissect_enrp is called from dissect_error cause */
-  if (pinfo && check_col(pinfo->cinfo, COL_PROTOCOL))
+  if (pinfo)
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "ENRP");
 
   /* In the interest of speed, if "tree" is NULL, don't do any work not
index b4da3800971e9f3db2e2a5bfc21c3e2252cf1dc9..b0c03e749d05922d4587c80f05a0e9a8bc369843 100644 (file)
@@ -972,10 +972,8 @@ dissect_edp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        guint16 seqno;
         vec_t cksum_vec[1];
 
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_SHORT_NAME);
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_set_str(pinfo->cinfo, COL_INFO, PROTO_SHORT_NAME ":");
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_SHORT_NAME);
+       col_set_str(pinfo->cinfo, COL_INFO, PROTO_SHORT_NAME ":");
 
        if (tree) {
                ti = proto_tree_add_item(tree, proto_edp, tvb, offset, -1,
index e88095f10525087380e828ce7c20f30604c1eb2d..4c34ba218071bfcb4ff3f47f85cce716a4e1b3bb 100644 (file)
@@ -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 ));
 
index 5716e505d91b0bc59491a1622a4fb3a4c82416c0..37226a292f3ad37b78ea010b86afa65f564b4fde 100644 (file)
@@ -294,8 +294,7 @@ dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         break;
     }
 
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_set_str(pinfo->cinfo, COL_INFO, info);
+    col_set_str(pinfo->cinfo, COL_INFO, info);
 
     rlen = tvb_get_ntohs(tvb, 6);
 
index 4c3be44a12b6f685b33d9fb4eb284042569c1c61..fb4425ebabcbf650162996b770c8c7789646537b 100644 (file)
@@ -177,7 +177,7 @@ dissect_fractalgeneratorprotocol(tvbuff_t *message_tvb, packet_info *pinfo, prot
   proto_tree *fractalgeneratorprotocol_tree;
 
   /* pinfo is NULL only if dissect_fractalgeneratorprotocol_message is called from dissect_error cause */
-  if (pinfo && (check_col(pinfo->cinfo, COL_PROTOCOL)))
+  if (pinfo)
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "FractalGeneratorProtocol");
 
   /* In the interest of speed, if "tree" is NULL, don't do any work not
index 150d093a050e8cd3cae3073e95392fbc4fcc6c9b..30fd4a2adca52236ce6511e0f1ecb1d7a6fa10a1 100644 (file)
@@ -3415,10 +3415,7 @@ dissect_gsm_sms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        g_port_src = 0;
        g_port_dst = 0;
 
-    if (check_col(pinfo->cinfo, COL_PROTOCOL))
-    {
-       col_set_str(pinfo->cinfo, COL_PROTOCOL, gsm_sms_proto_name_short);
-    }
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, gsm_sms_proto_name_short);
 
     /* In the interest of speed, if "tree" is NULL, don't do any work not
      * necessary to generate protocol tree items.
index 3a6519845841a84841db31a54f804085ea40a647..856829f5465860d2c4b6ac94a8b6243217a346fc 100644 (file)
@@ -1266,8 +1266,7 @@ static void dissect_h223 (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree
     guint32 offset = 0;
 
     /* set up the protocol and info fields in the summary pane */
-    if (check_col (pinfo->cinfo, COL_PROTOCOL))
-        col_set_str (pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_H223);
+    col_set_str (pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_H223);
 
     col_clear(pinfo->cinfo, COL_INFO);
 
index 5dbf0e1cff539dc4c2b36ee91805572211a12749..9afdbe7b690c2c3bcddb758acd5d945a22b4ba94 100644 (file)
@@ -7495,9 +7495,7 @@ dissect_h225_H323UserInformation(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
        next_tvb_init(&h245_list);
        next_tvb_init(&tp_list);
 
-       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);
 
        it=proto_tree_add_protocol_format(tree, proto_h225, tvb, 0, tvb_length(tvb), PSNAME" CS");
@@ -7533,9 +7531,7 @@ dissect_h225_h225_RasMessage(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
        reset_h225_packet_info(h225_pi);
        h225_pi->msg_type = H225_RAS;
 
-       if (check_col(pinfo->cinfo, COL_PROTOCOL)){
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
-       }
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
 
        it=proto_tree_add_protocol_format(tree, proto_h225, tvb, offset, tvb_length(tvb), PSNAME" RAS");
        tr=proto_item_add_subtree(it, ett_h225);
index bd5ea564aab2221e5d60fe6e5820c2fd0a256c9f..3ec6c1d17d2ccd7cf8f6dacc6f7282cc09f963f1 100644 (file)
@@ -14487,9 +14487,7 @@ dissect_h245_h245(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
        upcoming_channel = NULL;
        codec_type = NULL;
 
-       if (check_col(pinfo->cinfo, COL_PROTOCOL)){
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
-       }
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
 
        it=proto_tree_add_protocol_format(parent_tree, proto_h245, tvb, 0, tvb_length(tvb), PSNAME);
        tr=proto_item_add_subtree(it, ett_h245);
index 0cab86f64bf362f38736731f29f2f973a152ca5c..0cad1f9f4c16f89cb94c1bd7ef5f58d8e14b2b89 100644 (file)
@@ -4408,8 +4408,7 @@ dissect_h282(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   proto_item  *ti = NULL;
   proto_tree  *h282_tree = NULL;
 
-  if (check_col(pinfo->cinfo, COL_PROTOCOL))
-    col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
+  col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
 
   ti = proto_tree_add_item(tree, proto_h282, tvb, 0, -1, FALSE);
   h282_tree = proto_item_add_subtree(ti, ett_h282);
index 94407f88842256f0c10c7f5f5e58701c09829395..21bd743c913b91e4b1992a9314c2203024b3b148 100644 (file)
@@ -577,8 +577,7 @@ dissect_h283_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   proto_item  *ti = NULL;
   proto_tree  *h283_tree = NULL;
 
-  if (check_col(pinfo->cinfo, COL_PROTOCOL))
-    col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
+  col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
 
   info_is_set = FALSE;
 
index 8570ae25e27fc59c9fd115c1b5f84566ac8ef522..91535e80b9b19ea426f7db86fed00c62fd856473 100644 (file)
@@ -2528,8 +2528,7 @@ dissect_h501_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   proto_item  *ti = NULL;
   proto_tree  *h501_tree = NULL;
 
-  if (check_col(pinfo->cinfo, COL_PROTOCOL))
-    col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
+  col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
 
   ti = proto_tree_add_item(tree, proto_h501, tvb, 0, -1, FALSE);
   h501_tree = proto_item_add_subtree(ti, ett_h501);
index 019a55fb3096a56db6b6068607b2975ae1aeca9d..452b37eca76fe884c6648fb774aa93a53da5d590 100644 (file)
@@ -1323,7 +1323,7 @@ dissect_homeplug(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
     /** homeplug_ne indicates the number of MME entries. This field is fetched
      *  from MCTRL. 
      */
-    if ((homeplug_ne > 0) && check_col(pinfo->cinfo, COL_INFO)) {
+    if ((homeplug_ne > 0)) {
       col_clear(pinfo->cinfo, COL_INFO);
     }
     for (; homeplug_ne > 0; homeplug_ne--) {
index 1bb4e6d67b014c4c881afc3aa957ef2e7e137ce7..96613550710355fcd9ff48ee29ea884fcbf4eea0 100644 (file)
@@ -1005,10 +1005,7 @@ dissect_iax2 (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
   packet_type type;
 
   /* set up the protocol and info fields in the summary pane */
-  if (check_col (pinfo->cinfo, COL_PROTOCOL))
-    {
-      col_set_str (pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_IAX2);
-    }
+  col_set_str (pinfo->cinfo, COL_PROTOCOL, PROTO_TAG_IAX2);
   col_clear(pinfo->cinfo, COL_INFO);
 
   /* add the 'iax2' tree to the main tree */
@@ -1637,7 +1634,7 @@ dissect_fullpacket (tvbuff_t * tvb, guint32 offset,
       }
     }
 
-    if( rtp_marker && check_col (pinfo->cinfo, COL_INFO))
+    if( rtp_marker )
       col_append_str (pinfo->cinfo, COL_INFO, ", Mark" );
 
 
index 113bba29a3ee2dd5f62e6e6290f230e4d9791015..e590322790299947514d532a1505a79e0455399f 100644 (file)
@@ -486,8 +486,7 @@ static void dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   tvbuff_t *next_tvb;
   struct imf_field *f_info;
 
-  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);
 
   if(tree){
index cfcea5ef90b9caf09c4f88108ade5bbecd296ec2..1c749d717320012d3f3d03255da38ce3a9c0020f 100644 (file)
@@ -1496,8 +1496,7 @@ static void label_SUBM_Method(proto_item *SubMItem, MAD_Data *MadHeader, packet_
     const char *label = val_to_str(MadHeader->method, SUBM_Methods, "(Unknown SubManagement Method!)");
 
     proto_item_append_text(SubMItem, "%s", label);
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_str(pinfo->cinfo, COL_INFO, label);
+    col_append_str(pinfo->cinfo, COL_INFO, label);
 }
 
 /* Parse the SA Method from the MAD Common Header.
@@ -1510,8 +1509,7 @@ static void label_SUBA_Method(proto_item *SubAItem, MAD_Data *MadHeader, packet_
     const char *label = val_to_str(MadHeader->method, SUBA_Methods, "(Unknown SubAdministration Method!)");
 
     proto_item_append_text(SubAItem, "%s", label);
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_str(pinfo->cinfo, COL_INFO, label);
+    col_append_str(pinfo->cinfo, COL_INFO, label);
 }
 
 /* Parse the Attribute from the MAD Common Header
@@ -1524,8 +1522,7 @@ static void label_SUBM_Attribute(proto_item *SubMItem, MAD_Data *MadHeader, pack
     const char *label = val_to_str(MadHeader->attributeID, SUBM_Attributes, "(Unknown SubManagement Attribute!)");
 
     proto_item_append_text(SubMItem, "%s", &label[11]);
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_str(pinfo->cinfo, COL_INFO, &label[11]);
+    col_append_str(pinfo->cinfo, COL_INFO, &label[11]);
 }
 
 /* Parse the SA Attribute from the MAD Common Header
@@ -1538,8 +1535,7 @@ static void label_SUBA_Attribute(proto_item *SubAItem, MAD_Data *MadHeader, pack
     const char *label = val_to_str(MadHeader->attributeID, SUBA_Attributes, "(Unknown SubAdministration Attribute!)");
 
     proto_item_append_text(SubAItem, "%s", &label[11]);
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_str(pinfo->cinfo, COL_INFO, &label[11]);
+    col_append_str(pinfo->cinfo, COL_INFO, &label[11]);
 }
 
 /* Parse the attribute from a Subnet Management Packet.
index a837b89973b66d670c16f9277343ed1e741c5d63..2b4c60f5424163ebfd4931392da21b3e7416ff72 100644 (file)
@@ -1937,8 +1937,8 @@ dissect_l2tp_ip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        int index = 0;
        guint32 sid;                    /* Session ID */
 
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))      /* Only L2TPv3 runs directly over IP */
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, "L2TPv3");
+       /* Only L2TPv3 runs directly over IP */
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, "L2TPv3");
 
        col_clear(pinfo->cinfo, COL_INFO);
 
index d8b01fe5f064ffad0d9802a734c93cdd2fe20fac..05e390000a76b8b90c314dcb5bf2b75cc28f8d5d 100644 (file)
@@ -455,10 +455,8 @@ dissect_lapd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                }
        }
 
-       if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
-           col_set_str(pinfo->cinfo, COL_RES_DL_SRC, srcname);
-       if(check_col(pinfo->cinfo, COL_RES_DL_DST))
-           col_set_str(pinfo->cinfo, COL_RES_DL_DST, dstname);
+       col_set_str(pinfo->cinfo, COL_RES_DL_SRC, srcname);
+       col_set_str(pinfo->cinfo, COL_RES_DL_DST, dstname);
 
        if (tree) {
                proto_item *direction_ti;
index b9ada3eeee5383d66b9e34d0ce44898ee64971bf..485fc75260324190eb6fc63468c01b629f6c9d24 100644 (file)
@@ -115,7 +115,7 @@ dissect_loop(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     }
   } while (more_function);
 
-  if (set_info && check_col(pinfo->cinfo, COL_INFO)) {
+  if (set_info) {
     col_set_str(pinfo->cinfo, COL_INFO, "No valid function found");
   }
 
index b3626fc0ac16a7e557c59541fc4f1fb59629e465..8ccd0e0c17ea261d32dd78a6d5078e0cab4c9258 100644 (file)
@@ -228,7 +228,7 @@ dissect_manolito(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
        }
 
-       if (packet_type && check_col(pinfo->cinfo, COL_INFO))
+       if (packet_type)
        {
                col_set_str(pinfo->cinfo, COL_INFO, packet_type);
        }
index b01ae0d9d49c7606bc33f94f8ec85c5b42b1b49b..91aa4f67e58b6480c1c70acd12b71a0637d99382 100644 (file)
@@ -357,8 +357,7 @@ static int dissect_mgcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                 * Set the columns now, so that they'll be set correctly if we throw
                 * an exception.  We can set them later as well....
                 */
-               if (check_col(pinfo->cinfo, COL_PROTOCOL))
-                       col_set_str(pinfo->cinfo, COL_PROTOCOL, "MGCP");
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "MGCP");
                col_clear(pinfo->cinfo, COL_INFO);
 
                /*
index be11cefb5b7c2dbc4900f93982952cb2ddd76b9c..d4c74a703b60f91b765659bf7f977b158384da7f 100644 (file)
@@ -1109,8 +1109,8 @@ dissect_netbios(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                ++offset;
                if ( 0xefff != tvb_get_letohs(tvb, 3)){
 
-                       if (check_col( pinfo->cinfo, COL_INFO))         /* print bad packet */
-                               col_set_str( pinfo->cinfo, COL_INFO, "Bad packet, no 0xEFFF marker");
+                       /* print bad packet */
+                       col_set_str( pinfo->cinfo, COL_INFO, "Bad packet, no 0xEFFF marker");
 
                        return;         /* this is an unknown packet, no marker */
                }
index dcc87000d57f7b011e033494081c19f06b9e3922..742710317c0291cf93db64be6b93f6f08aa352ca 100644 (file)
@@ -195,9 +195,7 @@ dissect_pagp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       device_id.type = AT_ETHER;
       device_id.len = 6;
 
-      if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
-           col_set_str(pinfo->cinfo, COL_PROTOCOL, "PAGP"); /* PAGP Protocol */
-      }
+      col_set_str(pinfo->cinfo, COL_PROTOCOL, "PAGP"); /* PAGP Protocol */
 
       col_clear(pinfo->cinfo, COL_INFO);
 
index d755f7f7cf792e946ea0ee3970e826b167f99d98..1a9c105e8a0595881f27d019d1d29b7e6c8d7037 100644 (file)
@@ -149,7 +149,7 @@ dissect_pingpongprotocol(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *
   proto_tree *pingpongprotocol_tree;
 
   /* pinfo is NULL only if dissect_pingpongprotocol_message is called from dissect_error cause */
-  if (pinfo && (check_col(pinfo->cinfo, COL_PROTOCOL)))
+  if (pinfo)
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "PingPongProtocol");
 
   /* In the interest of speed, if "tree" is NULL, don't do any work not
index f6d0d6a8dc699cf4a509c0b63e020aadcac67d37..0d0c967b78e4b20fcf268795de087d3a793e1bf9 100644 (file)
@@ -484,10 +484,7 @@ gboolean too_small_packet_or_notpw(tvbuff_t * tvb
                                ,(int)packet_size);
                }
                /* represent problems in the Packet List pane */
-               if (check_col(pinfo->cinfo, COL_PROTOCOL))
-               {
-                       col_set_str(pinfo->cinfo, COL_PROTOCOL, proto_name_column);
-               }
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, proto_name_column);
                col_set_str(pinfo->cinfo, COL_INFO, "Malformed: PW packet is too small");
                return TRUE;
        }
@@ -613,10 +610,7 @@ void dissect_11_or_aal5_pdu(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tr
        if (PWATM_MODE_AAL5_PDU == pd.mode)
        {
                /* sub-dissectors _may_ overwrite columns in aal5_pdu mode */
-               if (check_col(pinfo->cinfo, COL_PROTOCOL))
-               {
-                       col_set_str(pinfo->cinfo, COL_PROTOCOL, proto_name_column);
-               }
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, proto_name_column);
                if (check_col(pinfo->cinfo, COL_INFO))
                {
                        col_clear(pinfo->cinfo, COL_INFO);
@@ -696,10 +690,7 @@ void dissect_11_or_aal5_pdu(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tr
        if (MODE_11(pd.mode))
        {
                /* overwrite everything written by sub-dissectors in 1:1 modes*/
-               if (check_col(pinfo->cinfo, COL_PROTOCOL))
-               {
-                       col_set_str(pinfo->cinfo, COL_PROTOCOL, proto_name_column);
-               }
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, proto_name_column);
                if (check_col(pinfo->cinfo, COL_INFO))
                {
                        col_clear(pinfo->cinfo, COL_INFO);
@@ -1081,10 +1072,7 @@ void dissect_n1_cw(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
 
        /* fill columns in Packet List */
        /* overwrite everything written by sub-dissectors */
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
-       {
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, proto_name_column);
-       }
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, proto_name_column);
 
        if (check_col(pinfo->cinfo, COL_INFO))
        {
@@ -1157,10 +1145,7 @@ void dissect_n1_nocw(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
        
        /* fill columns in Packet List */
        /* overwrite everything written by sub-dissectors */
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
-       {
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, proto_name_column);
-       }
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, proto_name_column);
 
        if (check_col(pinfo->cinfo, COL_INFO))
        {
index 687f5ace04d7005e11b094122e312466b2a6edc9..2bb408f97d7fadf1def4606e0625464d9ffba223 100644 (file)
@@ -103,10 +103,7 @@ void dissect_pw_satop(tvbuff_t * tvb_original
                                "PW packet size (%d) is too small to carry sensible information"
                                ,(int)packet_size);
                }
-               if (check_col(pinfo->cinfo, COL_PROTOCOL))
-               {
-                       col_set_str(pinfo->cinfo, COL_PROTOCOL, shortname);
-               }
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, shortname);
                col_set_str(pinfo->cinfo, COL_INFO, "Malformed: PW packet is too small");
                return;
        }
index 75f86200fdbe7cb0c2d27b526bde1d02a9e4b5bd..8050cb93644b1e57580d7a1e3d392dfb1b8fd992 100644 (file)
@@ -118,18 +118,14 @@ dissect_qllc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
      * a COMMAND or RESPONSE. */
     if (ctrl == QRD_QDISC_VALUE) {
         if (command) {
-            if (check_col(pinfo->cinfo, COL_INFO)) {
-                col_set_str(pinfo->cinfo, COL_INFO, QDISC_TEXT);
-            }
+           col_set_str(pinfo->cinfo, COL_INFO, QDISC_TEXT);
             if (tree) {
                 proto_tree_add_text(qllc_tree, tvb,
                         1, 1, "Control Field: %s (0x%02x)", QDISC_TEXT, ctrl);
             }
         }
         else {
-            if (check_col(pinfo->cinfo, COL_INFO)) {
-                col_set_str(pinfo->cinfo, COL_INFO, QRD_TEXT);
-            }
+           col_set_str(pinfo->cinfo, COL_INFO, QRD_TEXT);
             if (tree) {
                 proto_tree_add_text(qllc_tree, tvb,
                         1, 1, "Control Field: %s (0x%02x)", QRD_TEXT, ctrl);
index 962a6e353f45371faf7e8fbfe7854f09464351b9..9721dc8d814ecaeb0574f2750672e79185bbd91b 100644 (file)
@@ -64,8 +64,7 @@ dissect_redback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        proto_tree      *rbtree = NULL;
        tvbuff_t        *next_tvb;
 
-       if(check_col(pinfo->cinfo,COL_PROTOCOL))
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, "RBN");
+       col_set_str(pinfo->cinfo,COL_PROTOCOL,"RBN");
 
        dataoff = tvb_get_ntohs(tvb, 20);
        l3off = tvb_get_ntohs(tvb, 22);
index 16fa60e8ba7f463f7f615bdcacbf51be15a8fc04..7ed669847f9121832716c2f6e5a25724200e496c 100644 (file)
@@ -144,8 +144,7 @@ redbackli_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        proto_tree      *ti, *redbackli_tree=NULL;
        tvbuff_t        *next_tvb;
 
-       if(check_col(pinfo->cinfo,COL_PROTOCOL))
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, "RBLI");
+       col_set_str(pinfo->cinfo,COL_PROTOCOL,"RBLI");
 
        if (tree) {
                ti = proto_tree_add_item(tree, proto_redbackli,
index edad7e7b7cbc6e79dbfe07bf6f77663c079cb52a..2623967b17bb789620fa3ed0e739895e8a100f26 100644 (file)
@@ -161,8 +161,7 @@ dissect_rlm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                        break;;
        }
 
-       if (check_col(pinfo->cinfo, COL_INFO)) 
-               col_set_str(pinfo->cinfo, COL_INFO, type_str);
+       col_set_str(pinfo->cinfo, COL_INFO, type_str);
 
        if (tree) {
                /* proto_tree_add_protocol_format(tree, proto_rlm, tvb, 0,
index 022fd85ece0ab985b73885c9a8f7994dd87fa512..0ab84550f276e33e9f90f4257935568e2335fbe1 100644 (file)
@@ -209,8 +209,7 @@ static gboolean ros_try_string(const char *oid, tvbuff_t *tvb, packet_info *pinf
                        ros_tree = proto_item_add_subtree(item, *(rinfo->ett_proto));
                }
 
-               if (check_col(pinfo->cinfo, COL_PROTOCOL))
-                       col_set_str(pinfo->cinfo, COL_PROTOCOL, rinfo->name);
+                col_set_str(pinfo->cinfo, COL_PROTOCOL, rinfo->name);
 
                /* if this is a bind operation */
                if((session->ros_op & ROS_OP_TYPE_MASK) == ROS_OP_BIND) {
index 8910818f20ab22b2cf971fab7e18cc6a26100e30..3b3a79cc6214f87d3bfe49e4ddc4d77dca4ae987 100644 (file)
@@ -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);
 
index e47b777c31b8587c159efe1b07f2d59f9b344429..3ea9c7d9709d78ca2a59c233d19aff6ff5841223 100644 (file)
@@ -144,7 +144,7 @@ dissect_rtp_events( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree )
        }
 
        /* Make end-of-event packets obvious in the info column */
-       if ((octet & 0x80) && check_col(pinfo->cinfo, COL_INFO))
+       if ((octet & 0x80))
        {
                col_append_str(pinfo->cinfo, COL_INFO, " (end)");
        }
index 4c66bf99eed39e12ac381a1ba40e439c2b967fba..136b95b9800c8fdb0b5f3f9177fd697ff69a9710 100644 (file)
@@ -1738,8 +1738,7 @@ dissect_sabp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        proto_tree      *sabp_tree = NULL;
 
        /* make entry in the Protocol column on summary display */
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
+        col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
 
        /* create the sbap protocol tree */
        sabp_item = proto_tree_add_item(tree, proto_sabp, tvb, 0, -1, FALSE);
index 2e074ff26a34114e6346422714bf8f00e92cd885..69204ed4e1c869092a005422a74784d1fc31293f 100644 (file)
@@ -161,7 +161,7 @@ dissect_ssprotocol(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree)
   proto_tree *ssprotocol_tree;
 
   /* pinfo is NULL only if dissect_ssprotocol_message is called from dissect_error cause */
-  if (pinfo && (check_col(pinfo->cinfo, COL_PROTOCOL)))
+  if (pinfo)
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "SSP");
 
   /* In the interest of speed, if "tree" is NULL, don't do any work not
index 041f3522021c9f784db70ae72bdb2daa29896984..6e7c0c9efa3710673e579c1f1f7c48f69ebf046a 100644 (file)
@@ -323,10 +323,8 @@ dissect_sdp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
    */
   col_append_str(pinfo->cinfo, COL_PROTOCOL, "/SDP");
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-    /* XXX: Needs description. */
-    col_append_str(pinfo->cinfo, COL_INFO, ", with session description");
-  }
+  /* XXX: Needs description. */
+  col_append_str(pinfo->cinfo, COL_INFO, ", with session description");
 
   ti = proto_tree_add_item(tree, proto_sdp, tvb, offset, -1, FALSE);
   sdp_tree = proto_item_add_subtree(ti, ett_sdp);
index 2e70cfc465015bf7e03706158c145d505cac4f94..2dddd70e8dfdc61cdd603317d476bc509f261992 100644 (file)
@@ -293,8 +293,7 @@ dissect_tapa_discover(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
        DISSECTOR_ASSERT(remaining > 4);
 
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_SHORT_NAME);
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_SHORT_NAME);
        if (check_col(pinfo->cinfo, COL_INFO))
                col_add_fstr(pinfo->cinfo, COL_INFO, "Discover - %s",
                        val_to_str(packet_type, tapa_discover_type_vals, "Unknown (%d)"));
@@ -353,8 +352,7 @@ dissect_tapa_tunnel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        type = tvb_get_guint8(tvb, 1);
        remaining = tvb_reported_length(tvb);
 
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_SHORT_NAME);
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTO_SHORT_NAME);
        if (check_col(pinfo->cinfo, COL_INFO))
                col_add_fstr(pinfo->cinfo, COL_INFO, "Tunnel - V=%d, T=%s", version >> 4,
                        val_to_str(type, tapa_tunnel_type_vals, "Unknown (%d)"));
index a960d6fe2d053d58f9e6aed1ce57d7a430b50054..2cadc194d79bdcddc61fc16e0326539dedeabd65 100644 (file)
@@ -94,8 +94,7 @@ dissect_tivoconnect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                     "Discovery Connection" :
                     "Discovery Beacon";
 
-    if (check_col(pinfo->cinfo, COL_INFO)) 
-        col_set_str(pinfo->cinfo, COL_INFO, proto_name);
+    col_set_str(pinfo->cinfo, COL_INFO, proto_name);
 
     if (tree) {
         /* Set up structures needed to add the protocol subtree and manage it */
index f2d14e20b898a29255c194e1a5c2af468d692fec..6f6334fba84b553d727955cb571659ccfa6359c0 100644 (file)
@@ -640,14 +640,11 @@ static void dissect_tnef(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
 static void dissect_tnef_file(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 {
-  if (check_col(pinfo->cinfo, COL_PROTOCOL))
-    col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
+  col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME);
 
-  if (check_col(pinfo->cinfo, COL_DEF_SRC))
-    col_set_str(pinfo->cinfo, COL_DEF_SRC, PSNAME " encoded file");
+  col_set_str(pinfo->cinfo, COL_DEF_SRC, PSNAME " encoded file");
 
-  if (check_col(pinfo->cinfo, COL_INFO))
-    col_append_str(pinfo->cinfo, COL_INFO, PNAME);
+  col_append_str(pinfo->cinfo, COL_INFO, PNAME);
 
   dissect_tnef(tvb, pinfo, tree);
 }
index eaf3802271f3ffecd8450af1975739ea531806da..bb36c0cdd75a44c6d17c756192fa6bb3f30b3f71 100644 (file)
@@ -314,8 +314,7 @@ dissect_tzsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                info = val_to_str(type, tzsp_type, "Unknown (%u)");
        }
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_set_str(pinfo->cinfo, COL_INFO, info);
+       col_set_str(pinfo->cinfo, COL_INFO, info);
 
        if (tree) {
                /* Adding TZSP item and subtree */
index 90337cad6db694fae31bf05fa9bbf31ba71c1ae5..7da0fb220d3cd54d7f945a28eb25c25ce671ff6f 100644 (file)
@@ -87,8 +87,7 @@ static int testchar(tvbuff_t *tvb, packet_info *pinfo _U_, int offset, int op, g
                        return 0;
                }
        } else {
-               if (check_col(pinfo->cinfo, COL_INFO))
-                       col_set_str(pinfo->cinfo, COL_INFO, "Unknown Message Format");
+               col_set_str(pinfo->cinfo, COL_INFO, "Unknown Message Format");
                return 0;       
        }
 }
@@ -131,8 +130,7 @@ dissect_uts(tvbuff_t *tvb, packet_info *pinfo _U_ , proto_tree *tree)
 
        enum    { NOTRAFFIC, OTHER }    msg_type = OTHER;
 
-       if (check_col(pinfo->cinfo, COL_PROTOCOL)) /* set the protocol column on summary display */
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, "UTS");
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, "UTS");
 
        if (testchar(tvb, pinfo, 0, MATCH, EOT, NULL)     &&
                testchar(tvb, pinfo, 1, MATCH, EOT, NULL) &&
index e96abf76834ebb645d1e8ed8eb555b99f6e9819f..b32b00d2b7e752635592674b58eb15270bdb5121 100644 (file)
@@ -372,7 +372,7 @@ dissect_wtp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                proto_tree_add_uint(wtp_tree, hf_wtp_header_sub_pdu_size,
                                    tvb, offCur, c_fieldlen, c_pdulen);
            }
-           if (i > 1 && check_col(pinfo->cinfo, COL_INFO)) {
+           if (i > 1) {
                col_append_str(pinfo->cinfo, COL_INFO, ", ");
            }
            /* Skip the length field for the WTP sub-tvb */
index f921529163bc93bb2bdf48fe8993fb8a355dd929..fcb021ea3f6d0b76fa821375bffd8b38eb0e2a4c 100644 (file)
@@ -1410,8 +1410,7 @@ x25_ntoa(proto_tree *tree, int *offset, tvbuff_t *tvb,
     *second = '\0';
 
     if (len1) {
-       if (check_col(pinfo->cinfo, COL_RES_DL_DST))
-           col_add_str(pinfo->cinfo, COL_RES_DL_DST, addr1);
+        col_add_str(pinfo->cinfo, COL_RES_DL_DST, addr1);
        if (tree)
            proto_tree_add_text(tree, tvb, *offset,
                                (len1 + 1) / 2,
@@ -1421,8 +1420,7 @@ x25_ntoa(proto_tree *tree, int *offset, tvbuff_t *tvb,
                                addr1);
     }
     if (len2) {
-       if (check_col(pinfo->cinfo, COL_RES_DL_SRC))
-           col_add_str(pinfo->cinfo, COL_RES_DL_SRC, addr2);
+        col_add_str(pinfo->cinfo, COL_RES_DL_SRC, addr2);
        if (tree)
            proto_tree_add_text(tree, tvb, *offset + len1/2,
                                (len2+1)/2+(len1%2+(len2+1)%2)/2,
@@ -1499,8 +1497,7 @@ x25_toa(proto_tree *tree, int *offset, tvbuff_t *tvb,
     *second = '\0';
 
     if (len1) {
-       if (check_col(pinfo->cinfo, COL_RES_DL_DST))
-           col_add_str(pinfo->cinfo, COL_RES_DL_DST, addr1);
+        col_add_str(pinfo->cinfo, COL_RES_DL_DST, addr1);
        if (tree)
            proto_tree_add_text(tree, tvb, *offset,
                                (len1 + 1) / 2,
@@ -1508,8 +1505,7 @@ x25_toa(proto_tree *tree, int *offset, tvbuff_t *tvb,
                                addr1);
     }
     if (len2) {
-       if (check_col(pinfo->cinfo, COL_RES_DL_SRC))
-           col_add_str(pinfo->cinfo, COL_RES_DL_SRC, addr2);
+        col_add_str(pinfo->cinfo, COL_RES_DL_SRC, addr2);
        if (tree)
            proto_tree_add_text(tree, tvb, *offset + len1/2,
                                (len2+1)/2+(len1%2+(len2+1)%2)/2,
index 4e46354098e6cc003f24d694167e86ea69400404..205d9a5e0b8bbd325fa40f09fb4bb518c28cc3ad 100644 (file)
@@ -214,8 +214,7 @@ dissect_xml(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                ascii_strup_inplace(colinfo_str);
        }
 
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
-               col_append_str(pinfo->cinfo, COL_PROTOCOL, colinfo_str);
+       col_append_str(pinfo->cinfo, COL_PROTOCOL, colinfo_str);
 
        current_frame->ns = root_ns;
 
index fbcbb7f01d9332db07e4380359d7a04755fea2ce..cb42de579d70c572064d0b12bcccfbcb0c46dd13 100644 (file)
@@ -233,8 +233,7 @@ static void dissect_xot_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
            guint init_itf_name_len, resp_itf_name_len, pkt_size;
            gint hdr_offset = offset;
 
-           if (check_col(pinfo->cinfo, COL_INFO))
-              col_set_str(pinfo->cinfo, COL_INFO, "XOT PVC Setup");
+           col_set_str(pinfo->cinfo, COL_INFO, "XOT PVC Setup");
            proto_item_set_len(ti, XOT_HEADER_LENGTH + plen);
 
            /* These fields are in overlay with packet-x25.c */
index 40f28408eea70e81a760db1c99b4495390b7407b..b4e2212f4ca2212e3e2f06668fb8e765e0b04ef0 100644 (file)
@@ -490,9 +490,7 @@ zbee_append_info(proto_item *item, packet_info *pinfo, const gchar *format, ...)
     if (item) {
         proto_item_append_text(item, "%s", buffer);
     }
-    if (check_col(pinfo->cinfo, COL_INFO)) {
-        col_append_str(pinfo->cinfo, COL_INFO, buffer);
-    }
+    col_append_str(pinfo->cinfo, COL_INFO, buffer);
 } /* zbee_add_info */
 
 /*FUNCTION:------------------------------------------------------
index ca8003138f51a10c6ca1a3a5e7389d7c68cb105a..405cd0b65c0e8d4f8f046b7baa521dc4146c3332 100644 (file)
@@ -324,8 +324,7 @@ dissect_zrtp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
   col_set_str(pinfo->cinfo, COL_PROTOCOL, "ZRTP");
 
-  if (check_col(pinfo->cinfo, COL_INFO))
-    col_set_str(pinfo->cinfo, COL_INFO, "Unknown ZRTP Packet");
+  col_set_str(pinfo->cinfo, COL_INFO, "Unknown ZRTP Packet");
 
   ti = proto_tree_add_protocol_format(tree,proto_zrtp,tvb,0,-1,"ZRTP protocol");
   zrtp_tree = proto_item_add_subtree(ti,ett_zrtp);
index faaa670b0d6404f1af528aa61837cc82fa5e2b7c..d5a5d6389f81b2a6153828927601735311d5a40e 100644 (file)
@@ -393,8 +393,7 @@ WSLUA_METHOD Column_clear(lua_State *L) {
 
     if (!(c && c->cinfo)) return 0;
 
-    if (check_col(c->cinfo, c->col))
-        col_clear(c->cinfo, c->col);
+    col_clear(c->cinfo, c->col);
 
     return 0;
 }
@@ -410,8 +409,7 @@ WSLUA_METHOD Column_set(lua_State *L) {
 
     if (!s) WSLUA_ARG_ERROR(Column_set,TEXT,"must be a string");
 
-    if (check_col(c->cinfo, c->col))
-        col_set_str(c->cinfo, c->col, s);
+    col_set_str(c->cinfo, c->col, s);
 
     return 0;
 }
@@ -427,8 +425,7 @@ WSLUA_METHOD Column_append(lua_State *L) {
 
     if (!s) WSLUA_ARG_ERROR(Column_append,TEXT,"must be a string");
 
-    if (check_col(c->cinfo, c->col))
-        col_append_str(c->cinfo, c->col, s);
+    col_append_str(c->cinfo, c->col, s);
 
     return 0;
 }
@@ -505,8 +502,7 @@ WSLUA_METAMETHOD Columns__newindex(lua_State *L) {
 
     for(cn = colnames; cn->name; cn++) {
         if( g_str_equal(cn->name,colname) ) {
-            if (check_col(cols->cinfo, cn->id))
-                col_set_str(cols->cinfo, cn->id, text);
+            col_set_str(cols->cinfo, cn->id, text);
             return 0;
         }
     }
index eba27bcf5ea2b3bbdbee3113f7876ea73c974a0e..0d9647cb1e81a7c2f1bd9402c15a70a7ba4755ea 100644 (file)
@@ -1746,10 +1746,8 @@ static void dissect_irlap(tvbuff_t* tvb, packet_info* pinfo, proto_tree* root)
 
     /* initially set address columns to connection address */
     g_snprintf(addr, sizeof(addr)-1, "0x%02X", a >> 1);
-    if (check_col(pinfo->cinfo, COL_DEF_SRC))
-        col_add_str(pinfo->cinfo, COL_DEF_SRC, addr);
-    if (check_col(pinfo->cinfo, COL_DEF_DST))
-        col_add_str(pinfo->cinfo, COL_DEF_DST, addr);
+    col_add_str(pinfo->cinfo, COL_DEF_SRC, addr);
+    col_add_str(pinfo->cinfo, COL_DEF_DST, addr);
 
     if (root)
     {
index f99f21ded245b54213b3eba26ead908e0ccee968..4f77a7fe49d06c3aa5ce5941df4be3c1975df21b 100644 (file)
@@ -3224,7 +3224,6 @@ dissect_CBA_Connection_Data_heur(tvbuff_t *tvb,
         return FALSE;
     }
 
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
            col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-CBA");
 
     frame = cba_frame_find_by_cons(pinfo, pinfo->dl_dst.data, u16FrameID);
index 6f0d4a2856707543d72399039749f4fc2bb6cdd0..5269739917fa950c58d9cd1edd63541133e0a11c 100644 (file)
@@ -930,10 +930,8 @@ dissect_PNDCP_Data_heur(tvbuff_t *tvb,
         return FALSE;
     }
 
-    if (check_col(pinfo->cinfo, COL_PROTOCOL))
-        col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-DCP");
-    if (check_col(pinfo->cinfo, COL_INFO))
-      col_add_str(pinfo->cinfo, COL_INFO, "");
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-DCP");
+    col_clear(pinfo->cinfo, COL_INFO);
 
     /* subtree for DCP */
     item = proto_tree_add_protocol_format(tree, proto_pn_dcp, tvb, 0, tvb_get_ntohs(tvb, 8) + 10,
index c5c48fdeda22b7f31b109d5088d183fe67b17b73..8530005870ed36497d75634e3c38052174eb36ee 100644 (file)
@@ -184,11 +184,9 @@ dissect_PNMRRT_Data_heur(tvbuff_t *tvb,
         /* we are not interested in this packet */
         return FALSE;
     }
-
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
-           col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-MRRT");
-    if (check_col(pinfo->cinfo, COL_INFO))
-      col_add_str(pinfo->cinfo, COL_INFO, "");
+    
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-MRRT");
+    col_clear(pinfo->cinfo, COL_INFO);
 
     /* subtree for MRRT */
        item = proto_tree_add_protocol_format(tree, proto_pn_mrrt, tvb, 0, 0, "PROFINET MRRT, ");
index 00099ed9aebbf05707dd24a5a7dbb5976a104e4f..e4bba7951018dfcac989ce5d8bbe786817674159 100644 (file)
@@ -768,10 +768,8 @@ dissect_PNPTCP_Data_heur(tvbuff_t *tvb,
         return FALSE;
     }
 
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
-           col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-PTCP");
-    if (check_col(pinfo->cinfo, COL_INFO))
-      col_add_str(pinfo->cinfo, COL_INFO, "");
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-PTCP");
+    col_clear(pinfo->cinfo, COL_INFO);
 
     /* subtree for PTCP */
        item = proto_tree_add_protocol_format(tree, proto_pn_ptcp, tvb, 0, 0, "PROFINET PTCP, ");
index 149916b691cb99f0ba62d759188e934b9b607dba..97f0b9818fc4fdacae99fee940d7c443e4d6b62d 100644 (file)
@@ -355,10 +355,9 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
    * Set the columns now, so that they'll be set correctly if we throw
    * an exception.  We can set them (or append things) later again ....
    */
-  if (check_col(pinfo->cinfo, COL_PROTOCOL))
-    col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-RT");
-  if (check_col(pinfo->cinfo, COL_INFO))
-    col_set_str(pinfo->cinfo, COL_INFO, "PROFINET Real-Time");
+  
+  col_set_str(pinfo->cinfo, COL_PROTOCOL, "PN-RT");
+  col_set_str(pinfo->cinfo, COL_INFO, "PROFINET Real-Time");
 
   if (tvb_len < 6) {
     dissect_pn_malformed(tvb, 0, pinfo, tree, tvb_len);
@@ -663,10 +662,8 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     }
                
        /* update column info now */
-    if (check_col(pinfo->cinfo, COL_INFO))
-      col_add_str(pinfo->cinfo, COL_INFO, szFieldSummary);
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
-           col_add_str(pinfo->cinfo, COL_PROTOCOL, pszProtShort);
+    col_add_str(pinfo->cinfo, COL_INFO, szFieldSummary);
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, pszProtShort);
 
     pinfo->private_data = GUINT_TO_POINTER( (guint32) u16FrameID);
 
index dbb0466995a48c951f79aecdaea2a76f05c4a52a..f8b4c7f8ba9a34606c99a42b51a09bba448a0724 100644 (file)
@@ -2197,10 +2197,7 @@ dissect_wimaxasncp(
                                0x1f & ui8);
     }
 
-    if (check_col(pinfo->cinfo, COL_INFO))
-    {
-        col_add_str(pinfo->cinfo, COL_INFO, message_name);
-    }
+    col_add_str(pinfo->cinfo, COL_INFO, message_name);
 
     offset += 1;