aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2010-01-13 20:32:01 +0000
committerAnders Broman <anders.broman@ericsson.com>2010-01-13 20:32:01 +0000
commit440c3f9261af41a397823a80121cfa0122df1c88 (patch)
tree64b368c46b53e0e8f52e80f61ed17e13d64596a5 /epan
parent6343ffb68e3e7ea3b335ad5e443e23f324a99d35 (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')
-rw-r--r--epan/dissectors/packet-ajp13.c6
-rw-r--r--epan/dissectors/packet-alcap.c7
-rw-r--r--epan/dissectors/packet-ansi_637.c10
-rw-r--r--epan/dissectors/packet-ansi_683.c5
-rw-r--r--epan/dissectors/packet-ansi_801.c5
-rw-r--r--epan/dissectors/packet-asap.c2
-rw-r--r--epan/dissectors/packet-bittorrent.c4
-rw-r--r--epan/dissectors/packet-btl2cap.c69
-rw-r--r--epan/dissectors/packet-btrfcomm.c8
-rw-r--r--epan/dissectors/packet-calcappprotocol.c2
-rw-r--r--epan/dissectors/packet-cisco-erspan.c6
-rw-r--r--epan/dissectors/packet-dcerpc.c7
-rw-r--r--epan/dissectors/packet-dcp-etsi.c4
-rw-r--r--epan/dissectors/packet-ddtp.c13
-rw-r--r--epan/dissectors/packet-dec-dnart.c9
-rw-r--r--epan/dissectors/packet-dect.c116
-rw-r--r--epan/dissectors/packet-dis.c5
-rw-r--r--epan/dissectors/packet-distcc.c4
-rw-r--r--epan/dissectors/packet-dtls.c3
-rw-r--r--epan/dissectors/packet-enrp.c2
-rw-r--r--epan/dissectors/packet-extreme.c6
-rw-r--r--epan/dissectors/packet-fcp.c28
-rw-r--r--epan/dissectors/packet-fip.c3
-rw-r--r--epan/dissectors/packet-fractalgeneratorprotocol.c2
-rw-r--r--epan/dissectors/packet-gsm_sms.c5
-rw-r--r--epan/dissectors/packet-h223.c3
-rw-r--r--epan/dissectors/packet-h225.c8
-rw-r--r--epan/dissectors/packet-h245.c4
-rw-r--r--epan/dissectors/packet-h282.c3
-rw-r--r--epan/dissectors/packet-h283.c3
-rw-r--r--epan/dissectors/packet-h501.c3
-rw-r--r--epan/dissectors/packet-homeplug.c2
-rw-r--r--epan/dissectors/packet-iax2.c7
-rw-r--r--epan/dissectors/packet-imf.c3
-rw-r--r--epan/dissectors/packet-infiniband.c12
-rw-r--r--epan/dissectors/packet-l2tp.c4
-rw-r--r--epan/dissectors/packet-lapd.c6
-rw-r--r--epan/dissectors/packet-loop.c2
-rw-r--r--epan/dissectors/packet-manolito.c2
-rw-r--r--epan/dissectors/packet-mgcp.c3
-rw-r--r--epan/dissectors/packet-netbios.c4
-rw-r--r--epan/dissectors/packet-pagp.c4
-rw-r--r--epan/dissectors/packet-pingpongprotocol.c2
-rw-r--r--epan/dissectors/packet-pw-atm.c25
-rw-r--r--epan/dissectors/packet-pw-satop.c5
-rw-r--r--epan/dissectors/packet-qllc.c8
-rw-r--r--epan/dissectors/packet-redback.c3
-rw-r--r--epan/dissectors/packet-redbackli.c3
-rw-r--r--epan/dissectors/packet-rlm.c3
-rw-r--r--epan/dissectors/packet-ros.c3
-rw-r--r--epan/dissectors/packet-rpcap.c17
-rw-r--r--epan/dissectors/packet-rtp-events.c2
-rw-r--r--epan/dissectors/packet-sabp.c3
-rw-r--r--epan/dissectors/packet-scriptingservice.c2
-rw-r--r--epan/dissectors/packet-sdp.c6
-rw-r--r--epan/dissectors/packet-tapa.c6
-rw-r--r--epan/dissectors/packet-tivoconnect.c3
-rw-r--r--epan/dissectors/packet-tnef.c9
-rw-r--r--epan/dissectors/packet-tzsp.c3
-rw-r--r--epan/dissectors/packet-uts.c6
-rw-r--r--epan/dissectors/packet-wtp.c2
-rw-r--r--epan/dissectors/packet-x25.c12
-rw-r--r--epan/dissectors/packet-xml.c3
-rw-r--r--epan/dissectors/packet-xot.c3
-rw-r--r--epan/dissectors/packet-zbee-zdp.c4
-rw-r--r--epan/dissectors/packet-zrtp.c3
-rw-r--r--epan/wslua/wslua_pinfo.c12
67 files changed, 167 insertions, 385 deletions
diff --git a/epan/dissectors/packet-ajp13.c b/epan/dissectors/packet-ajp13.c
index 685b2fd28a..8efe28b922 100644
--- a/epan/dissectors/packet-ajp13.c
+++ b/epan/dissectors/packet-ajp13.c
@@ -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;
}
diff --git a/epan/dissectors/packet-alcap.c b/epan/dissectors/packet-alcap.c
index 23f541ec9b..01d720e355 100644
--- a/epan/dissectors/packet-alcap.c
+++ b/epan/dissectors/packet-alcap.c
@@ -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);
diff --git a/epan/dissectors/packet-ansi_637.c b/epan/dissectors/packet-ansi_637.c
index 7ac3815b4a..671ecee261 100644
--- a/epan/dissectors/packet-ansi_637.c
+++ b/epan/dissectors/packet-ansi_637.c
@@ -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.
diff --git a/epan/dissectors/packet-ansi_683.c b/epan/dissectors/packet-ansi_683.c
index 16ac06ea0e..827d329560 100644
--- a/epan/dissectors/packet-ansi_683.c
+++ b/epan/dissectors/packet-ansi_683.c
@@ -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.
diff --git a/epan/dissectors/packet-ansi_801.c b/epan/dissectors/packet-ansi_801.c
index 248e66c2e9..72685e1d89 100644
--- a/epan/dissectors/packet-ansi_801.c
+++ b/epan/dissectors/packet-ansi_801.c
@@ -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.
diff --git a/epan/dissectors/packet-asap.c b/epan/dissectors/packet-asap.c
index 5b6fd070df..ef4a96cec0 100644
--- a/epan/dissectors/packet-asap.c
+++ b/epan/dissectors/packet-asap.c
@@ -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
diff --git a/epan/dissectors/packet-bittorrent.c b/epan/dissectors/packet-bittorrent.c
index 3abf6aa435..b1c174fcd0 100644
--- a/epan/dissectors/packet-bittorrent.c
+++ b/epan/dissectors/packet-bittorrent.c
@@ -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:
diff --git a/epan/dissectors/packet-btl2cap.c b/epan/dissectors/packet-btl2cap.c
index 09e5bcd84f..371ab49283 100644
--- a/epan/dissectors/packet-btl2cap.c
+++ b/epan/dissectors/packet-btl2cap.c
@@ -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:
diff --git a/epan/dissectors/packet-btrfcomm.c b/epan/dissectors/packet-btrfcomm.c
index 07ccea0ad7..a58ab5e01d 100644
--- a/epan/dissectors/packet-btrfcomm.c
+++ b/epan/dissectors/packet-btrfcomm.c
@@ -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);
diff --git a/epan/dissectors/packet-calcappprotocol.c b/epan/dissectors/packet-calcappprotocol.c
index fa69b47f56..d12213bddb 100644
--- a/epan/dissectors/packet-calcappprotocol.c
+++ b/epan/dissectors/packet-calcappprotocol.c
@@ -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
diff --git a/epan/dissectors/packet-cisco-erspan.c b/epan/dissectors/packet-cisco-erspan.c
index 4cc00f4556..e4f61f6b10 100644
--- a/epan/dissectors/packet-cisco-erspan.c
+++ b/epan/dissectors/packet-cisco-erspan.c
@@ -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,
diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c
index 9dde6f7ca4..383e023c7e 100644
--- a/epan/dissectors/packet-dcerpc.c
+++ b/epan/dissectors/packet-dcerpc.c
@@ -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);
diff --git a/epan/dissectors/packet-dcp-etsi.c b/epan/dissectors/packet-dcp-etsi.c
index 28d46c1411..43568679b8 100644
--- a/epan/dissectors/packet-dcp-etsi.c
+++ b/epan/dissectors/packet-dcp-etsi.c
@@ -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;
diff --git a/epan/dissectors/packet-ddtp.c b/epan/dissectors/packet-ddtp.c
index 64a3c6f312..ce2dc5ecad 100644
--- a/epan/dissectors/packet-ddtp.c
+++ b/epan/dissectors/packet-ddtp.c
@@ -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);
diff --git a/epan/dissectors/packet-dec-dnart.c b/epan/dissectors/packet-dec-dnart.c
index ee3036bf2c..cbfb87f026 100644
--- a/epan/dissectors/packet-dec-dnart.c
+++ b/epan/dissectors/packet-dec-dnart.c
@@ -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);
diff --git a/epan/dissectors/packet-dect.c b/epan/dissectors/packet-dect.c
index 7971ab11c7..b33c74ea77 100644
--- a/epan/dissectors/packet-dect.c
+++ b/epan/dissectors/packet-dect.c
@@ -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;
}
}
diff --git a/epan/dissectors/packet-dis.c b/epan/dissectors/packet-dis.c
index 72e882a49a..e164f7a954 100644
--- a/epan/dissectors/packet-dis.c
+++ b/epan/dissectors/packet-dis.c
@@ -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.
diff --git a/epan/dissectors/packet-distcc.c b/epan/dissectors/packet-distcc.c
index 08c8b3ee50..34cc87e8fd 100644
--- a/epan/dissectors/packet-distcc.c
+++ b/epan/dissectors/packet-distcc.c
@@ -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);
diff --git a/epan/dissectors/packet-dtls.c b/epan/dissectors/packet-dtls.c
index aa12826199..6aae2d63c2 100644
--- a/epan/dissectors/packet-dtls.c
+++ b/epan/dissectors/packet-dtls.c
@@ -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, ", ");
}
diff --git a/epan/dissectors/packet-enrp.c b/epan/dissectors/packet-enrp.c
index f568796750..706055ba81 100644
--- a/epan/dissectors/packet-enrp.c
+++ b/epan/dissectors/packet-enrp.c
@@ -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
diff --git a/epan/dissectors/packet-extreme.c b/epan/dissectors/packet-extreme.c
index b4da380097..b0c03e749d 100644
--- a/epan/dissectors/packet-extreme.c
+++ b/epan/dissectors/packet-extreme.c
@@ -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,
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 ));
diff --git a/epan/dissectors/packet-fip.c b/epan/dissectors/packet-fip.c
index 5716e505d9..37226a292f 100644
--- a/epan/dissectors/packet-fip.c
+++ b/epan/dissectors/packet-fip.c
@@ -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);
diff --git a/epan/dissectors/packet-fractalgeneratorprotocol.c b/epan/dissectors/packet-fractalgeneratorprotocol.c
index 4c3be44a12..fb4425ebab 100644
--- a/epan/dissectors/packet-fractalgeneratorprotocol.c
+++ b/epan/dissectors/packet-fractalgeneratorprotocol.c
@@ -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
diff --git a/epan/dissectors/packet-gsm_sms.c b/epan/dissectors/packet-gsm_sms.c
index 150d093a05..30fd4a2adc 100644
--- a/epan/dissectors/packet-gsm_sms.c
+++ b/epan/dissectors/packet-gsm_sms.c
@@ -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.
diff --git a/epan/dissectors/packet-h223.c b/epan/dissectors/packet-h223.c
index 3a65198458..856829f546 100644
--- a/epan/dissectors/packet-h223.c
+++ b/epan/dissectors/packet-h223.c
@@ -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);
diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c
index 5dbf0e1cff..9afdbe7b69 100644
--- a/epan/dissectors/packet-h225.c
+++ b/epan/dissectors/packet-h225.c
@@ -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);
diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c
index bd5ea564aa..3ec6c1d17d 100644
--- a/epan/dissectors/packet-h245.c
+++ b/epan/dissectors/packet-h245.c
@@ -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);
diff --git a/epan/dissectors/packet-h282.c b/epan/dissectors/packet-h282.c
index 0cab86f64b..0cad1f9f4c 100644
--- a/epan/dissectors/packet-h282.c
+++ b/epan/dissectors/packet-h282.c
@@ -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);
diff --git a/epan/dissectors/packet-h283.c b/epan/dissectors/packet-h283.c
index 94407f8884..21bd743c91 100644
--- a/epan/dissectors/packet-h283.c
+++ b/epan/dissectors/packet-h283.c
@@ -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;
diff --git a/epan/dissectors/packet-h501.c b/epan/dissectors/packet-h501.c
index 8570ae25e2..91535e80b9 100644
--- a/epan/dissectors/packet-h501.c
+++ b/epan/dissectors/packet-h501.c
@@ -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);
diff --git a/epan/dissectors/packet-homeplug.c b/epan/dissectors/packet-homeplug.c
index 019a55fb30..452b37eca7 100644
--- a/epan/dissectors/packet-homeplug.c
+++ b/epan/dissectors/packet-homeplug.c
@@ -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--) {
diff --git a/epan/dissectors/packet-iax2.c b/epan/dissectors/packet-iax2.c
index 1bb4e6d67b..9661355071 100644
--- a/epan/dissectors/packet-iax2.c
+++ b/epan/dissectors/packet-iax2.c
@@ -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" );
diff --git a/epan/dissectors/packet-imf.c b/epan/dissectors/packet-imf.c
index 113bba29a3..e590322790 100644
--- a/epan/dissectors/packet-imf.c
+++ b/epan/dissectors/packet-imf.c
@@ -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){
diff --git a/epan/dissectors/packet-infiniband.c b/epan/dissectors/packet-infiniband.c
index cfcea5ef90..1c749d7173 100644
--- a/epan/dissectors/packet-infiniband.c
+++ b/epan/dissectors/packet-infiniband.c
@@ -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.
diff --git a/epan/dissectors/packet-l2tp.c b/epan/dissectors/packet-l2tp.c
index a837b89973..2b4c60f542 100644
--- a/epan/dissectors/packet-l2tp.c
+++ b/epan/dissectors/packet-l2tp.c
@@ -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);
diff --git a/epan/dissectors/packet-lapd.c b/epan/dissectors/packet-lapd.c
index d8b01fe5f0..05e390000a 100644
--- a/epan/dissectors/packet-lapd.c
+++ b/epan/dissectors/packet-lapd.c
@@ -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;
diff --git a/epan/dissectors/packet-loop.c b/epan/dissectors/packet-loop.c
index b9ada3eeee..485fc75260 100644
--- a/epan/dissectors/packet-loop.c
+++ b/epan/dissectors/packet-loop.c
@@ -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");
}
diff --git a/epan/dissectors/packet-manolito.c b/epan/dissectors/packet-manolito.c
index b3626fc0ac..8ccd0e0c17 100644
--- a/epan/dissectors/packet-manolito.c
+++ b/epan/dissectors/packet-manolito.c
@@ -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);
}
diff --git a/epan/dissectors/packet-mgcp.c b/epan/dissectors/packet-mgcp.c
index b01ae0d9d4..91aa4f67e5 100644
--- a/epan/dissectors/packet-mgcp.c
+++ b/epan/dissectors/packet-mgcp.c
@@ -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);
/*
diff --git a/epan/dissectors/packet-netbios.c b/epan/dissectors/packet-netbios.c
index be11cefb5b..d4c74a703b 100644
--- a/epan/dissectors/packet-netbios.c
+++ b/epan/dissectors/packet-netbios.c
@@ -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 */
}
diff --git a/epan/dissectors/packet-pagp.c b/epan/dissectors/packet-pagp.c
index dcc87000d5..742710317c 100644
--- a/epan/dissectors/packet-pagp.c
+++ b/epan/dissectors/packet-pagp.c
@@ -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);
diff --git a/epan/dissectors/packet-pingpongprotocol.c b/epan/dissectors/packet-pingpongprotocol.c
index d755f7f7cf..1a9c105e8a 100644
--- a/epan/dissectors/packet-pingpongprotocol.c
+++ b/epan/dissectors/packet-pingpongprotocol.c
@@ -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
diff --git a/epan/dissectors/packet-pw-atm.c b/epan/dissectors/packet-pw-atm.c
index f6d0d6a8dc..0d0c967b78 100644
--- a/epan/dissectors/packet-pw-atm.c
+++ b/epan/dissectors/packet-pw-atm.c
@@ -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))
{
diff --git a/epan/dissectors/packet-pw-satop.c b/epan/dissectors/packet-pw-satop.c
index 687f5ace04..2bb408f97d 100644
--- a/epan/dissectors/packet-pw-satop.c
+++ b/epan/dissectors/packet-pw-satop.c
@@ -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;
}
diff --git a/epan/dissectors/packet-qllc.c b/epan/dissectors/packet-qllc.c
index 75f86200fd..8050cb9364 100644
--- a/epan/dissectors/packet-qllc.c
+++ b/epan/dissectors/packet-qllc.c
@@ -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);
diff --git a/epan/dissectors/packet-redback.c b/epan/dissectors/packet-redback.c
index 962a6e353f..9721dc8d81 100644
--- a/epan/dissectors/packet-redback.c
+++ b/epan/dissectors/packet-redback.c
@@ -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);
diff --git a/epan/dissectors/packet-redbackli.c b/epan/dissectors/packet-redbackli.c
index 16fa60e8ba..7ed669847f 100644
--- a/epan/dissectors/packet-redbackli.c
+++ b/epan/dissectors/packet-redbackli.c
@@ -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,
diff --git a/epan/dissectors/packet-rlm.c b/epan/dissectors/packet-rlm.c
index edad7e7b7c..2623967b17 100644
--- a/epan/dissectors/packet-rlm.c
+++ b/epan/dissectors/packet-rlm.c
@@ -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,
diff --git a/epan/dissectors/packet-ros.c b/epan/dissectors/packet-ros.c
index 022fd85ece..0ab84550f2 100644
--- a/epan/dissectors/packet-ros.c
+++ b/epan/dissectors/packet-ros.c
@@ -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) {
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);
diff --git a/epan/dissectors/packet-rtp-events.c b/epan/dissectors/packet-rtp-events.c
index e47b777c31..3ea9c7d970 100644
--- a/epan/dissectors/packet-rtp-events.c
+++ b/epan/dissectors/packet-rtp-events.c
@@ -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)");
}
diff --git a/epan/dissectors/packet-sabp.c b/epan/dissectors/packet-sabp.c
index 4c66bf99ee..136b95b980 100644
--- a/epan/dissectors/packet-sabp.c
+++ b/epan/dissectors/packet-sabp.c
@@ -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);
diff --git a/epan/dissectors/packet-scriptingservice.c b/epan/dissectors/packet-scriptingservice.c
index 2e074ff26a..69204ed4e1 100644
--- a/epan/dissectors/packet-scriptingservice.c
+++ b/epan/dissectors/packet-scriptingservice.c
@@ -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
diff --git a/epan/dissectors/packet-sdp.c b/epan/dissectors/packet-sdp.c
index 041f352202..6e7c0c9efa 100644
--- a/epan/dissectors/packet-sdp.c
+++ b/epan/dissectors/packet-sdp.c
@@ -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);
diff --git a/epan/dissectors/packet-tapa.c b/epan/dissectors/packet-tapa.c
index 2e70cfc465..2dddd70e8d 100644
--- a/epan/dissectors/packet-tapa.c
+++ b/epan/dissectors/packet-tapa.c
@@ -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)"));
diff --git a/epan/dissectors/packet-tivoconnect.c b/epan/dissectors/packet-tivoconnect.c
index a960d6fe2d..2cadc194d7 100644
--- a/epan/dissectors/packet-tivoconnect.c
+++ b/epan/dissectors/packet-tivoconnect.c
@@ -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 */
diff --git a/epan/dissectors/packet-tnef.c b/epan/dissectors/packet-tnef.c
index f2d14e20b8..6f6334fba8 100644
--- a/epan/dissectors/packet-tnef.c
+++ b/epan/dissectors/packet-tnef.c
@@ -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);
}
diff --git a/epan/dissectors/packet-tzsp.c b/epan/dissectors/packet-tzsp.c
index eaf3802271..bb36c0cdd7 100644
--- a/epan/dissectors/packet-tzsp.c
+++ b/epan/dissectors/packet-tzsp.c
@@ -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 */
diff --git a/epan/dissectors/packet-uts.c b/epan/dissectors/packet-uts.c
index 90337cad6d..7da0fb220d 100644
--- a/epan/dissectors/packet-uts.c
+++ b/epan/dissectors/packet-uts.c
@@ -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) &&
diff --git a/epan/dissectors/packet-wtp.c b/epan/dissectors/packet-wtp.c
index e96abf7683..b32b00d2b7 100644
--- a/epan/dissectors/packet-wtp.c
+++ b/epan/dissectors/packet-wtp.c
@@ -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 */
diff --git a/epan/dissectors/packet-x25.c b/epan/dissectors/packet-x25.c
index f921529163..fcb021ea3f 100644
--- a/epan/dissectors/packet-x25.c
+++ b/epan/dissectors/packet-x25.c
@@ -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,
diff --git a/epan/dissectors/packet-xml.c b/epan/dissectors/packet-xml.c
index 4e46354098..205d9a5e0b 100644
--- a/epan/dissectors/packet-xml.c
+++ b/epan/dissectors/packet-xml.c
@@ -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;
diff --git a/epan/dissectors/packet-xot.c b/epan/dissectors/packet-xot.c
index fbcbb7f01d..cb42de579d 100644
--- a/epan/dissectors/packet-xot.c
+++ b/epan/dissectors/packet-xot.c
@@ -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 */
diff --git a/epan/dissectors/packet-zbee-zdp.c b/epan/dissectors/packet-zbee-zdp.c
index 40f28408ee..b4e2212f4c 100644
--- a/epan/dissectors/packet-zbee-zdp.c
+++ b/epan/dissectors/packet-zbee-zdp.c
@@ -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:------------------------------------------------------
diff --git a/epan/dissectors/packet-zrtp.c b/epan/dissectors/packet-zrtp.c
index ca8003138f..405cd0b65c 100644
--- a/epan/dissectors/packet-zrtp.c
+++ b/epan/dissectors/packet-zrtp.c
@@ -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);
diff --git a/epan/wslua/wslua_pinfo.c b/epan/wslua/wslua_pinfo.c
index faaa670b0d..d5a5d6389f 100644
--- a/epan/wslua/wslua_pinfo.c
+++ b/epan/wslua/wslua_pinfo.c
@@ -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;
}
}