Remove check_col() and the occasional tree.
authorMichael Mann <mmann78@netscape.net>
Fri, 14 Jun 2013 02:50:46 +0000 (02:50 -0000)
committerMichael Mann <mmann78@netscape.net>
Fri, 14 Jun 2013 02:50:46 +0000 (02:50 -0000)
svn path=/trunk/; revision=49923

62 files changed:
epan/dissectors/packet-scsi.c
epan/dissectors/packet-sebek.c
epan/dissectors/packet-selfm.c
epan/dissectors/packet-sita.c
epan/dissectors/packet-skinny.c
epan/dissectors/packet-sll.c
epan/dissectors/packet-slsk.c
epan/dissectors/packet-smb-browse.c
epan/dissectors/packet-smb-logon.c
epan/dissectors/packet-smb-mailslot.c
epan/dissectors/packet-smb-pipe.c
epan/dissectors/packet-smb.c
epan/dissectors/packet-smb2.c
epan/dissectors/packet-smpp.c
epan/dissectors/packet-smrse.c
epan/dissectors/packet-sna.c
epan/dissectors/packet-sndcp.c
epan/dissectors/packet-spp.c
epan/dissectors/packet-srvloc.c
epan/dissectors/packet-sscf-nni.c
epan/dissectors/packet-sscop.c
epan/dissectors/packet-starteam.c
epan/dissectors/packet-synphasor.c
epan/dissectors/packet-syslog.c
epan/dissectors/packet-tali.c
epan/dissectors/packet-tapa.c
epan/dissectors/packet-tcp.c
epan/dissectors/packet-teamspeak2.c
epan/dissectors/packet-teimanagement.c
epan/dissectors/packet-telkonet.c
epan/dissectors/packet-teredo.c
epan/dissectors/packet-text-media.c
epan/dissectors/packet-time.c
epan/dissectors/packet-tivoconnect.c
epan/dissectors/packet-tns.c
epan/dissectors/packet-tpncp.c
epan/dissectors/packet-trmac.c
epan/dissectors/packet-tsp.c
epan/dissectors/packet-turbocell.c
epan/dissectors/packet-turnchannel.c
epan/dissectors/packet-tuxedo.c
epan/dissectors/packet-tzsp.c
epan/dissectors/packet-ua.c
epan/dissectors/packet-ua3g.c
epan/dissectors/packet-uasip.c
epan/dissectors/packet-uaudp.c
epan/dissectors/packet-ucp.c
epan/dissectors/packet-udld.c
epan/dissectors/packet-usb-hid.c
epan/dissectors/packet-usb-masstorage.c
epan/dissectors/packet-uts.c
epan/dissectors/packet-v120.c
epan/dissectors/packet-vj.c
epan/dissectors/packet-vnc.c
epan/dissectors/packet-wbxml.c
epan/dissectors/packet-wccp.c
epan/dissectors/packet-wcp.c
epan/dissectors/packet-who.c
epan/dissectors/packet-wlccp.c
epan/dissectors/packet-wow.c
epan/dissectors/packet-wps.c
epan/dissectors/packet-wtls.c

index 8b83708ec778cdfdf126d16e9202dd7946a3b3d5..fa5f332cb9239f18612c957207618a6b6550068e 100644 (file)
@@ -5048,14 +5048,11 @@ dissect_scsi_rsp(tvbuff_t *tvb, packet_info *pinfo,
 
     ti = proto_tree_add_uint(scsi_tree, hf_scsi_status, tvb, 0, 0, scsi_status);
     PROTO_ITEM_SET_GENERATED(ti);
-    if (check_col(pinfo->cinfo, COL_INFO)) {
-        col_add_fstr(pinfo->cinfo, COL_INFO, "SCSI: Response LUN: 0x%02x (%s) (%s)", itlq->lun,
+    col_add_fstr(pinfo->cinfo, COL_INFO, "SCSI: Response LUN: 0x%02x (%s) (%s)", itlq->lun,
                      val_to_str(itlq->scsi_opcode, csdata->cdb_vals, "CDB:0x%02x"),
                      val_to_str(scsi_status, scsi_status_val, "Unknown (0x%08x)"));
 
-        col_set_fence(pinfo->cinfo, COL_INFO);
-    }
-
+    col_set_fence(pinfo->cinfo, COL_INFO);
 }
 
 void
@@ -5086,11 +5083,9 @@ dissect_scsi_snsinfo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 
     ti = proto_tree_add_uint(sns_tree, hf_scsi_lun, tvb, 0, 0, itlq->lun);
     PROTO_ITEM_SET_GENERATED(ti);
-    if (check_col(pinfo->cinfo, COL_INFO)) {
-        col_append_fstr(pinfo->cinfo, COL_INFO, " LUN:0x%02x ", itlq->lun);
+    col_append_fstr(pinfo->cinfo, COL_INFO, " LUN:0x%02x ", itlq->lun);
 
-        col_set_fence(pinfo->cinfo, COL_INFO);
-    }
+    col_set_fence(pinfo->cinfo, COL_INFO);
 
     dissect_scsi_sense(tvb, sns_tree, offset);
 
@@ -5406,15 +5401,13 @@ dissect_scsi_cdb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
         valstr = try_val_to_str(opcode, csdata->cdb_vals);
     }
 
-    if (check_col(pinfo->cinfo, COL_INFO)) {
-        if (valstr != NULL) {
-            col_add_fstr(pinfo->cinfo, COL_INFO, "SCSI: %s LUN: 0x%02x ", valstr, itlq->lun);
-        } else {
-            col_add_fstr(pinfo->cinfo, COL_INFO, "SCSI Command: 0x%02x LUN:0x%02x ", opcode, itlq->lun);
-        }
-        /* make sure no one will overwrite this in the info column */
-        col_set_fence(pinfo->cinfo, COL_INFO);
+    if (valstr != NULL) {
+        col_add_fstr(pinfo->cinfo, COL_INFO, "SCSI: %s LUN: 0x%02x ", valstr, itlq->lun);
+    } else {
+        col_add_fstr(pinfo->cinfo, COL_INFO, "SCSI Command: 0x%02x LUN:0x%02x ", opcode, itlq->lun);
     }
+    /* make sure no one will overwrite this in the info column */
+    col_set_fence(pinfo->cinfo, COL_INFO);
 
     cdata = ep_new(scsi_task_data_t);
     cdata->itl = itl;
@@ -5521,17 +5514,14 @@ dissect_scsi_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
         scsi_tree = proto_item_add_subtree(ti, ett_scsi);
     }
 
-    if (check_col(pinfo->cinfo, COL_INFO)) {
-        col_add_fstr(pinfo->cinfo, COL_INFO,
-                     "SCSI: Data %s LUN: 0x%02x (%s %s) ",
-                     isreq ? "Out" : "In",
-                     itlq->lun,
-                     val_to_str(opcode, csdata->cdb_vals, "0x%02x"),
-                     isreq ? "Request Data" : "Response Data");
-
-        col_set_fence(pinfo->cinfo, COL_INFO);
-    }
+    col_add_fstr(pinfo->cinfo, COL_INFO,
+                    "SCSI: Data %s LUN: 0x%02x (%s %s) ",
+                    isreq ? "Out" : "In",
+                    itlq->lun,
+                    val_to_str(opcode, csdata->cdb_vals, "0x%02x"),
+                    isreq ? "Request Data" : "Response Data");
 
+    col_set_fence(pinfo->cinfo, COL_INFO);
 
     ti = proto_tree_add_uint(scsi_tree, hf_scsi_lun, tvb, 0, 0, itlq->lun);
     PROTO_ITEM_SET_GENERATED(ti);
@@ -5633,10 +5623,8 @@ dissect_scsi_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     next_tvb = process_reassembled_data(tvb, offset, pinfo, "Reassembled SCSI DATA", ipfd_head, &scsi_frag_items, &update_col_info, tree);
 
     if ( ipfd_head && (ipfd_head->reassembled_in != pinfo->fd->num) ) {
-        if (check_col(pinfo->cinfo, COL_INFO)) {
-            col_prepend_fstr(pinfo->cinfo, COL_INFO, "[Reassembled in #%u] ",
+        col_prepend_fstr(pinfo->cinfo, COL_INFO, "[Reassembled in #%u] ",
                              ipfd_head->reassembled_in);
-        }
     }
 
 
index 18184c645dca84af51966656ff3e10f833628cb7..27efea0da4e461783819dfece1d1568d1dac1136 100644 (file)
@@ -129,22 +129,20 @@ dissect_sebek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
 
        col_set_str(pinfo->cinfo, COL_PROTOCOL, "SEBEK");
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-       {
-               col_set_str(pinfo->cinfo, COL_INFO, "SEBEK - ");
+       col_set_str(pinfo->cinfo, COL_INFO, "SEBEK - ");
 
-               if (tvb_length(tvb)<6)
-                       sebek_ver = 0;
-                else
-                       sebek_ver = tvb_get_ntohs(tvb, 4);
+       if (tvb_length(tvb)<6)
+               sebek_ver = 0;
+       else
+               sebek_ver = tvb_get_ntohs(tvb, 4);
 
-                switch (sebek_ver) {
-                       case 2: col_append_fstr(pinfo->cinfo, COL_INFO, " pid(%d)", tvb_get_ntohl(tvb, 20));
+       switch (sebek_ver) {
+               case 2: col_append_fstr(pinfo->cinfo, COL_INFO, " pid(%d)", tvb_get_ntohl(tvb, 20));
                                col_append_fstr(pinfo->cinfo, COL_INFO, " uid(%d)", tvb_get_ntohl(tvb, 24));
                                col_append_fstr(pinfo->cinfo, COL_INFO, " fd(%d)", tvb_get_ntohl(tvb, 28));
                                col_append_fstr(pinfo->cinfo, COL_INFO, " cmd: %s", tvb_format_text(tvb, 32, 12));
                                break;
-                       case 3: col_append_fstr(pinfo->cinfo, COL_INFO, " pid(%d)", tvb_get_ntohl(tvb, 24));
+               case 3: col_append_fstr(pinfo->cinfo, COL_INFO, " pid(%d)", tvb_get_ntohl(tvb, 24));
                                col_append_fstr(pinfo->cinfo, COL_INFO, " uid(%d)", tvb_get_ntohl(tvb, 28));
                                col_append_fstr(pinfo->cinfo, COL_INFO, " fd(%d)", tvb_get_ntohl(tvb, 32));
                                cmd_len = tvb_strnlen(tvb, 40, 12);
@@ -152,12 +150,10 @@ dissect_sebek(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
                                        cmd_len = 0;
                                col_append_fstr(pinfo->cinfo, COL_INFO, " cmd: %s", tvb_format_text(tvb, 40, cmd_len));
                                break;
-                       default:
-                               break;
-                }
+               default:
+                       break;
        }
 
-
        if (tree) {
                /* Adding Sebek item and subtree */
                ti = proto_tree_add_item(tree, proto_sebek, tvb, 0, -1, ENC_NA);
index 14199ee3de114681db5bd1c7df1e6ed71f17fe52..c500de582829122ced40c78b0a06ac0e478ed808 100644 (file)
@@ -1290,19 +1290,13 @@ dissect_fastop_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int of
         proto_tree_add_item(fastop_tree, hf_selfm_fastop_rb_code, tvb, offset, 1, ENC_BIG_ENDIAN);
 
         /* Append Column Info w/ Control Code Code */
-        if (check_col(pinfo->cinfo, COL_INFO)) {
-            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%s", val_to_str_const(opcode, selfm_fo_rb_vals, "Unknown Control Code"));
-        }
-
+        col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%s", val_to_str_const(opcode, selfm_fo_rb_vals, "Unknown Control Code"));
     }
     else if (msg_type == CMD_FASTOP_BR_CTRL) {
         proto_tree_add_item(fastop_tree, hf_selfm_fastop_br_code, tvb, offset, 1, ENC_BIG_ENDIAN);
 
         /* Append Column Info w/ Control Code Code */
-        if (check_col(pinfo->cinfo, COL_INFO)) {
-            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%s", val_to_str_const(opcode, selfm_fo_br_vals, "Unknown Control Code"));
-        }
-
+        col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%s", val_to_str_const(opcode, selfm_fo_br_vals, "Unknown Control Code"));
     }
     offset += 1;
 
@@ -1354,9 +1348,7 @@ dissect_fastser_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int o
     proto_tree_add_item(fastser_tree, hf_selfm_fastser_funccode, tvb, offset, 1, ENC_BIG_ENDIAN);
 
     /* Append Column Info w/ Function Code */
-    if (check_col(pinfo->cinfo, COL_INFO)) {
-        col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%s", val_to_str_const(funccode, selfm_fastser_func_code_vals, "Unknown Function Code"));
-    }
+    col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%s", val_to_str_const(funccode, selfm_fastser_func_code_vals, "Unknown Function Code"));
 
     offset += 1;
 
@@ -1468,10 +1460,8 @@ dissect_fastser_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int o
              fc_enable = tvb_get_guint8(tvb, offset);
              proto_tree_add_item(fastser_tree, hf_selfm_fastser_uns_en_fc, tvb, offset, 1, ENC_BIG_ENDIAN);
 
-            /* Append Column Info w/ "Enable" Function Code */
-            if (check_col(pinfo->cinfo, COL_INFO)) {
-                col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "Function to Enable (%#x)", fc_enable);
-            }
+             /* Append Column Info w/ "Enable" Function Code */
+             col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "Function to Enable (%#x)", fc_enable);
 
              /* 3-byte Function Code data */
              proto_tree_add_item(fastser_tree, hf_selfm_fastser_uns_en_fc_data, tvb, offset+1, 3, ENC_NA);
@@ -1486,10 +1476,8 @@ dissect_fastser_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int o
              fc_enable = tvb_get_guint8(tvb, offset);
              proto_tree_add_item(fastser_tree, hf_selfm_fastser_uns_dis_fc, tvb, offset, 1, ENC_BIG_ENDIAN);
 
-            /* Append Column Info w/ "Disable" Function Code */
-            if (check_col(pinfo->cinfo, COL_INFO)) {
-                col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "Function to Disable (%#x)", fc_enable);
-            }
+             /* Append Column Info w/ "Disable" Function Code */
+             col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "Function to Disable (%#x)", fc_enable);
 
              /* 1-byte Function Code data */
              proto_tree_add_item(fastser_tree, hf_selfm_fastser_uns_dis_fc_data, tvb, offset+1, 1, ENC_NA);
@@ -1506,9 +1494,7 @@ dissect_fastser_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int o
             base_addr = tvb_get_ntohs(tvb, offset); /* unknown - 16-bit field with base address to read? */
 
             /* Append Column Info w/ Base Address */
-            if (check_col(pinfo->cinfo, COL_INFO)) {
-                col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%#x", base_addr);
-            }
+            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%#x", base_addr);
 
             proto_tree_add_item(fastser_tree, hf_selfm_fastser_read_baseaddr, tvb, offset, 2, ENC_BIG_ENDIAN);
             proto_tree_add_item(fastser_tree, hf_selfm_fastser_read_numaddr, tvb, offset+2, 2, ENC_BIG_ENDIAN);
@@ -1523,9 +1509,7 @@ dissect_fastser_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int o
             num_addr = tvb_get_ntohs(tvb, offset+2); /* unknown - 16-bit field with number of 16-bit addresses to read? */
 
             /* Append Column Info w/ Base Address */
-            if (check_col(pinfo->cinfo, COL_INFO)) {
-                col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%#x", base_addr);
-            }
+            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%#x", base_addr);
 
             proto_tree_add_item(fastser_tree, hf_selfm_fastser_read_baseaddr, tvb, offset, 2, ENC_BIG_ENDIAN);
             proto_tree_add_item(fastser_tree, hf_selfm_fastser_read_numaddr, tvb, offset+2, 2, ENC_BIG_ENDIAN);
@@ -1616,9 +1600,7 @@ dissect_fastser_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int o
             num_reg = tvb_get_ntohs(tvb, offset+4);
 
             /* Append Column Info w/ Address Information */
-            if (check_col(pinfo->cinfo, COL_INFO)) {
-                col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%#x, %#x", addr1, addr2);
-            }
+            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%#x, %#x", addr1, addr2);
 
             proto_tree_add_item(fastser_tree, hf_selfm_fastser_unswrite_addr1, tvb, offset, 2, ENC_BIG_ENDIAN);
             proto_tree_add_item(fastser_tree, hf_selfm_fastser_unswrite_addr2, tvb, offset+2, 2, ENC_BIG_ENDIAN);
@@ -1686,9 +1668,7 @@ dissect_fastser_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int o
             offset += 2;
 
             /* Append Column Info w/ Base Address */
-            if (check_col(pinfo->cinfo, COL_INFO)) {
-                col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%#x", base_addr);
-            }
+            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%#x", base_addr);
 
             break;
 
@@ -1703,9 +1683,7 @@ dissect_fastser_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int o
             offset += 2;
 
             /* Append Column Info w/ Base Address */
-            if (check_col(pinfo->cinfo, COL_INFO)) {
-                col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%#x", base_addr);
-            }
+            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%#x", base_addr);
 
             /* unknown - 16-bit field with number of tags to follow? */
             proto_tree_add_item(fastser_tree, hf_selfm_fastser_datafmt_resp_num_tag, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -1738,9 +1716,7 @@ dissect_fastser_frame(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int o
             offset += 2;
 
             /* Append Column Info w/ Base Address */
-            if (check_col(pinfo->cinfo, COL_INFO)) {
-                col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%#x", base_addr);
-            }
+            col_append_sep_fstr(pinfo->cinfo, COL_INFO, NULL, "%#x", base_addr);
             break;
 
         case FAST_SER_BITLABEL_RESP: /* 0xB3 - Bit Label Response - unknown full structure */
@@ -1832,10 +1808,8 @@ dissect_selfm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         selfm_item = proto_tree_add_protocol_format(tree, proto_selfm, selfm_tvb, 0, len, "SEL Fast Message");
         selfm_tree = proto_item_add_subtree(selfm_item, ett_selfm);
 
-        if (check_col(pinfo->cinfo, COL_INFO)) {
-            col_clear(pinfo->cinfo, COL_INFO); /* clear out stuff in the info column */
-            col_add_fstr(pinfo->cinfo, COL_INFO, "%s", val_to_str_const(msg_type, selfm_msgtype_vals, "Unknown Message Type"));
-        }
+        col_clear(pinfo->cinfo, COL_INFO); /* clear out stuff in the info column */
+        col_add_fstr(pinfo->cinfo, COL_INFO, "%s", val_to_str_const(msg_type, selfm_msgtype_vals, "Unknown Message Type"));
 
         /* Add Message Type to Protocol Tree */
         proto_tree_add_item(selfm_tree, hf_selfm_msgtype, selfm_tvb, offset, 2, ENC_BIG_ENDIAN);
index 95eb99899fad605a5356b35a779a95a7904eab74..46ee19e19803d40a69b29c1fb8fc5128209ff68e 100644 (file)
@@ -125,16 +125,13 @@ dissect_sita(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     errors2 = pinfo->pseudo_header->sita.sita_errors2;
     proto   = pinfo->pseudo_header->sita.sita_proto;
 
-    if (check_col(pinfo->cinfo, COL_DEF_SRC)) {
-        if ((flags & SITA_FRAME_DIR) == SITA_FRAME_DIR_TXED) {
-            col_set_str(pinfo->cinfo, COL_DEF_SRC, IOP);  /* set the source (direction) column accordingly */
-        } else {
-            col_set_str(pinfo->cinfo, COL_DEF_SRC, REMOTE);
-        }
+    if ((flags & SITA_FRAME_DIR) == SITA_FRAME_DIR_TXED) {
+        col_set_str(pinfo->cinfo, COL_DEF_SRC, IOP);  /* set the source (direction) column accordingly */
+    } else {
+        col_set_str(pinfo->cinfo, COL_DEF_SRC, REMOTE);
     }
 
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_set_str(pinfo->cinfo, COL_INFO, "");
+    col_set_str(pinfo->cinfo, COL_INFO, "");
 
     if (tree) {
         ti = proto_tree_add_protocol_format(tree, proto_sita, tvb, 0, 0, "Link Layer");
@@ -195,10 +192,10 @@ dissect_sita(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
     /* try to find and run an applicable dissector */
     if (!dissector_try_uint(sita_dissector_table, pinfo->pseudo_header->sita.sita_proto, tvb, pinfo, tree)) {
-        if (check_col(pinfo->cinfo, COL_PROTOCOL))              /* if one can't be found... tell them we don't */
-            col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN"); /* know how to decode this protocol */
-        if (check_col(pinfo->cinfo, COL_INFO))                  /* and give them the details then */
-            col_add_fstr(pinfo->cinfo, COL_INFO, "IOP protocol number: %u", pinfo->pseudo_header->sita.sita_proto);
+        /* if one can't be found... tell them we don't know how to decode this protocol
+           and give them the details then */
+        col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
+        col_add_fstr(pinfo->cinfo, COL_INFO, "IOP protocol number: %u", pinfo->pseudo_header->sita.sita_proto);
         call_dissector(data_handle, tvb, pinfo, tree);          /* call the generic (hex display) decoder instead */
     }
 }
index 25037b2b3ceac5f396476c705f2cea71e9019172..58a7540e97ee9a6ab1334198f24eba0abd240519 100644 (file)
@@ -1488,14 +1488,10 @@ dissect_skinny_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     proto_tree_add_uint(skinny_tree, hf_skinny_hdr_version, tvb, offset+4, 4, hdr_version);
   }
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-    col_add_fstr(pinfo->cinfo, COL_INFO,"%s ", si->messageName);
-    col_set_fence(pinfo->cinfo, COL_INFO);
-  }
+  col_add_fstr(pinfo->cinfo, COL_INFO,"%s ", si->messageName);
+  col_set_fence(pinfo->cinfo, COL_INFO);
 
-  if (tree) {
-    proto_tree_add_uint(skinny_tree, hf_skinny_messageid, tvb,offset+8, 4, data_messageid );
-  }
+  proto_tree_add_uint(skinny_tree, hf_skinny_messageid, tvb,offset+8, 4, data_messageid );
 
   {
     switch(data_messageid) {
index ed2436015d252c1fae6001df4b8bf6319b34e74b..2987b84dda9e4e6b2d15549bbba54111b2690740 100644 (file)
@@ -177,8 +177,7 @@ dissect_sll(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                break;
        }
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_add_str(pinfo->cinfo, COL_INFO,
+       col_add_str(pinfo->cinfo, COL_INFO,
                    val_to_str(pkttype, packet_type_vals, "Unknown (%u)"));
 
        if (tree) {
index 88c7b7ba3cbd7afeabd95d0e4705913c18cc6c76..8e923853df5f8d9c21aa00de85eb8e696c764c80 100644 (file)
@@ -333,10 +333,7 @@ static void dissect_slsk_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
 
   col_set_str(pinfo->cinfo, COL_INFO, "SoulSeek Message");
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", message_type);
-  }
-
+  col_append_fstr(pinfo->cinfo, COL_INFO, ": %s", message_type);
 
   if (tree) {
 
index 5e951dc95aa7915c0e0fd806a99a3456a8422692..251bba9f5a5b79ed607e2afb85694acc91477d37 100644 (file)
@@ -505,13 +505,11 @@ dissect_smb_server_type_flags(tvbuff_t *tvb, int offset, packet_info *pinfo,
 
        if (infoflag) {
                /* Append the type(s) of the system to the COL_INFO line ... */
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       for (i = 0; i < 32; i++) {
-                               if (flags & (1<<i)) {
-                                       col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
-                                               val_to_str(i, server_types,
-                                               "Unknown server type:%d"));
-                               }
+               for (i = 0; i < 32; i++) {
+                       if (flags & (1<<i)) {
+                               col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
+                                       val_to_str(i, server_types,
+                                       "Unknown server type:%d"));
                        }
                }
        }
@@ -593,17 +591,12 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
 
        cmd = tvb_get_guint8(tvb, offset);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               /* Put in something, and replace it later */
-               col_add_str(pinfo->cinfo, COL_INFO, val_to_str(cmd, commands, "Unknown command:0x%02x"));
-       }
+       /* Put in something, and replace it later */
+       col_add_str(pinfo->cinfo, COL_INFO, val_to_str(cmd, commands, "Unknown command:0x%02x"));
 
 
-       if (parent_tree) {
-               item = proto_tree_add_item(parent_tree, proto_smb_browse, tvb, offset, -1, ENC_NA);
-
-               tree = proto_item_add_subtree(item, ett_browse);
-       }
+       item = proto_tree_add_item(parent_tree, proto_smb_browse, tvb, offset, -1, ENC_NA);
+       tree = proto_item_add_subtree(item, ett_browse);
 
        /* command */
        proto_tree_add_uint(tree, hf_command, tvb, offset, 1, cmd);
@@ -631,9 +624,7 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
                        "UTF-8", "CP437", NULL, NULL, NULL);
                if (utf8_host_name == NULL)
                        utf8_host_name = host_name;
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, " %s", utf8_host_name);
-               }
+               col_append_fstr(pinfo->cinfo, COL_INFO, " %s", utf8_host_name);
                proto_tree_add_string_format(tree, hf_server_name,
                        tvb, offset, 16,
                        utf8_host_name,
@@ -713,9 +704,7 @@ dissect_mailslot_browse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
                computer_name = tvb_get_ephemeral_stringz(tvb, offset, &namelen);
                proto_tree_add_string(tree, hf_response_computer_name,
                        tvb, offset, namelen, computer_name);
-               if (check_col(pinfo->cinfo, COL_INFO))
-                       col_append_fstr(
-                               pinfo->cinfo, COL_INFO, " %s", computer_name);
+               col_append_fstr(pinfo->cinfo, COL_INFO, " %s", computer_name);
                break;
        }
 
@@ -844,10 +833,8 @@ dissect_mailslot_lanman(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
 
        cmd = tvb_get_guint8(tvb, offset);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               /* Put in something, and replace it later */
-               col_add_str(pinfo->cinfo, COL_INFO, val_to_str(cmd, commands, "Unknown command:0x%02x"));
-       }
+       /* Put in something, and replace it later */
+       col_add_str(pinfo->cinfo, COL_INFO, val_to_str(cmd, commands, "Unknown command:0x%02x"));
 
 
        if (parent_tree) {
@@ -900,9 +887,8 @@ dissect_mailslot_lanman(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
 
                /* server name */
                host_name = tvb_get_const_stringz(tvb, offset, &namelen);
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, " %s", host_name);
-               }
+               col_append_fstr(pinfo->cinfo, COL_INFO, " %s", host_name);
+
                proto_tree_add_item(tree, hf_server_name,
                        tvb, offset, namelen, ENC_ASCII|ENC_NA);
                offset += namelen;
index 854ee790bf2d3e5b5888ed9c8bc1c2482646525f..50c1df2982f81d7b400fd736c18f31122ca2ae70 100644 (file)
@@ -334,8 +334,7 @@ dissect_smb_pdc_query(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, i
        /* computer name */
        offset = display_ms_string(tvb, tree, offset, hf_computer_name, &name);
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_append_fstr(pinfo->cinfo, COL_INFO, " from %s", name);
+       col_append_fstr(pinfo->cinfo, COL_INFO, " from %s", name);
 
        /* mailslot name */
        offset = display_ms_string(tvb, tree, offset, hf_mailslot_name, NULL);
@@ -389,7 +388,7 @@ dissect_smb_pdc_startup(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
          /* pdc name */
          offset = display_unicode_string(tvb, tree, offset, hf_unicode_pdc_name, &name);
 
-         if (name && check_col(pinfo->cinfo, COL_INFO)) {
+         if (name) {
                  col_append_fstr(pinfo->cinfo, COL_INFO, ": host %s", name);
                  name = NULL;
          }
@@ -399,7 +398,7 @@ dissect_smb_pdc_startup(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree,
          /* domain name */
          offset = display_unicode_string(tvb, tree, offset, hf_domain_name, &name);
 
-         if (name && check_col(pinfo->cinfo, COL_INFO)) {
+         if (name) {
                  col_append_fstr(pinfo->cinfo, COL_INFO, ", domain %s", name);
                  name = NULL;
          }
@@ -926,10 +925,9 @@ dissect_smb_logon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        /* get the Command field */
        cmd = tvb_get_guint8(tvb, offset);
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_add_str(pinfo->cinfo, COL_INFO, val_to_str(cmd, commands, "Unknown Command:%02x") );
+       col_add_str(pinfo->cinfo, COL_INFO, val_to_str(cmd, commands, "Unknown Command:%02x") );
 
-       if (tree) {
+       if (tree) {
                item = proto_tree_add_item(tree, proto_smb_logon, tvb,
                        offset, -1, ENC_NA);
 
index dada1e98462f0a495ed00abdca0e2b0d75743480..6733a0059b70571f39371f009d4229c7861bf1c6 100644 (file)
@@ -152,10 +152,8 @@ dissect_mailslot_smb(tvbuff_t *mshdr_tvb, tvbuff_t *setup_tvb,
                /* do the opcode field */
                opcode = tvb_get_letohs(setup_tvb, offset);
 
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_add_str(pinfo->cinfo, COL_INFO,
+               col_add_str(pinfo->cinfo, COL_INFO,
                                    val_to_str(opcode, opcode_vals, "Unknown opcode: 0x%04x"));
-               }
 
 
                /* These are in the setup words; use "setup_tvb". */
index 80c5a87f9960cae97dad838b7b045ab398ab319e..faeade271a6889eb41e5989bb2dcc6d16ed0195d 100644 (file)
@@ -2685,9 +2685,8 @@ dissect_pipe_lanman(tvbuff_t *pd_tvb, tvbuff_t *p_tvb, tvbuff_t *d_tvb,
        if (smb_info->request) { /* this is a request */
                /* function code */
                cmd = tvb_get_letohs(p_tvb, offset);
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_add_fstr(pinfo->cinfo, COL_INFO, "%s Request", val_to_str_ext(cmd, &commands_ext, "Unknown Command (%u)"));
-               }
+               col_add_fstr(pinfo->cinfo, COL_INFO, "%s Request", val_to_str_ext(cmd, &commands_ext, "Unknown Command (%u)"));
+
                proto_tree_add_uint(tree, hf_function_code, p_tvb, offset, 2,
                    cmd);
                offset += 2;
@@ -2825,19 +2824,17 @@ dissect_pipe_lanman(tvbuff_t *pd_tvb, tvbuff_t *p_tvb, tvbuff_t *d_tvb,
                if( ( (p_tvb==NULL) || (tvb_reported_length(p_tvb)==0) )
                &&  ( (d_tvb==NULL) || (tvb_reported_length(d_tvb)==0) ) ){
                        /* command */
-                       if (check_col(pinfo->cinfo, COL_INFO)) {
-                               col_add_fstr(pinfo->cinfo, COL_INFO, "%s Interim Response",
+                       col_add_fstr(pinfo->cinfo, COL_INFO, "%s Interim Response",
                                             val_to_str_ext(trp->lanman_cmd, &commands_ext, "Unknown Command (%u)"));
-                       }
+
                        proto_tree_add_uint(tree, hf_function_code, p_tvb, 0, 0, trp->lanman_cmd);
                        return TRUE;
                }
 
                /* command */
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_add_fstr(pinfo->cinfo, COL_INFO, "%s Response",
+               col_add_fstr(pinfo->cinfo, COL_INFO, "%s Response",
                                     val_to_str_ext(trp->lanman_cmd, &commands_ext, "Unknown Command (%u)"));
-               }
+
                proto_tree_add_uint(tree, hf_function_code, p_tvb, 0, 0,
                    trp->lanman_cmd);
 
@@ -3540,10 +3537,8 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb,
         * Set the columns.
         */
        col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMB Pipe");
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_set_str(pinfo->cinfo, COL_INFO,
+       col_set_str(pinfo->cinfo, COL_INFO,
                    smb_info->request ? "Request" : "Response");
-       }
 
        if (smb_info->sip != NULL && smb_info->sip->extra_info_type == SMB_EI_TRI)
                tri = (smb_transact_info_t *)smb_info->sip->extra_info;
@@ -3576,11 +3571,10 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb,
                proto_tree_add_uint(pipe_tree, hf_pipe_function, s_tvb,
                    offset, 2, function);
                offset += 2;
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",
+               col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",
                            val_to_str(function, functions, "Unknown function (0x%04x)"),
                            smb_info->request ? "Request" : "Response");
-               }
+
                if (tri != NULL)
                        tri->function = function;
 
@@ -3635,11 +3629,10 @@ dissect_pipe_smb(tvbuff_t *sp_tvb, tvbuff_t *s_tvb, tvbuff_t *pd_tvb,
                        function = tri->function;
                        proto_tree_add_uint(pipe_tree, hf_pipe_function, NULL,
                            0, 0, function);
-                       if (check_col(pinfo->cinfo, COL_INFO)) {
-                               col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",
+                       col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",
                                    val_to_str(function, functions, "Unknown function (0x%04x)"),
                                    smb_info->request ? "Request" : "Response");
-                       }
+
                        fid = tri->fid;
                        if (fid != -1)
                                dissect_smb_fid(d_tvb, pinfo, pipe_tree, 0, 0, (guint16) fid, FALSE, FALSE, TRUE);
index a4f15393562512c9b5d65bc8caec9187f522c0b4..6b9b6cc8ab07e45f50518ff2d928b901a563b4c5 100644 (file)
@@ -2670,10 +2670,8 @@ dissect_old_dir_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int
                dn);
        COUNT_BYTES(dn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Directory: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Directory: %s",
                    format_text(dn, strlen(dn)));
-       }
 
        END_OF_SMB
 
@@ -2814,10 +2812,8 @@ dissect_tree_connect_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
                offset, an_len, an);
        COUNT_BYTES(an_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
                    format_text(an, strlen(an)));
-       }
 
        /* buffer format */
        CHECK_BYTE_COUNT(1);
@@ -3140,10 +3136,8 @@ dissect_move_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
                fn_len, fn, "Old File Name: %s", format_text(fn, strlen(fn)));
        COUNT_BYTES(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Old Name: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Old Name: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        /* buffer format */
        CHECK_BYTE_COUNT(1);
@@ -3159,10 +3153,8 @@ dissect_move_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
                fn_len, fn, "New File Name: %s", format_text(fn, strlen(fn)));
        COUNT_BYTES(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", New Name: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", New Name: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        END_OF_SMB
 
@@ -3209,10 +3201,8 @@ dissect_copy_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
                fn_len, fn, "Source File Name: %s", format_text(fn, strlen(fn)));
        COUNT_BYTES(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Source Name: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Source Name: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        /* buffer format */
        CHECK_BYTE_COUNT(1);
@@ -3229,9 +3219,7 @@ dissect_copy_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int of
                format_text(fn, strlen(fn)));
        COUNT_BYTES(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Destination Name: %s", format_text(fn, strlen(fn)));
-       }
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Destination Name: %s", format_text(fn, strlen(fn)));
 
        END_OF_SMB
 
@@ -3329,10 +3317,8 @@ dissect_open_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
                si->sip->extra_info      = fsi;
        }
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        END_OF_SMB
 
@@ -3607,8 +3593,7 @@ dissect_smb_fid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
                PROTO_ITEM_SET_GENERATED(it);
        }
        tr = proto_item_add_subtree(it, ett_smb_fid);
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", FID: 0x%04x", fid);
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", FID: 0x%04x", fid);
 
        if ((!pinfo->fd->flags.visited) && is_created) {
                fid_info = (smb_fid_info_t *)se_alloc(sizeof(smb_fid_info_t));
@@ -3954,10 +3939,8 @@ dissect_create_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        }
 
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        END_OF_SMB
 
@@ -4025,10 +4008,8 @@ dissect_delete_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                fn);
        COUNT_BYTES(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        END_OF_SMB
 
@@ -4069,10 +4050,8 @@ dissect_rename_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                fn);
        COUNT_BYTES(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Old Name: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Old Name: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        /* buffer format */
        CHECK_BYTE_COUNT(1);
@@ -4089,10 +4068,8 @@ dissect_rename_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                fn);
        COUNT_BYTES(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", New Name: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", New Name: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        END_OF_SMB
 
@@ -4147,10 +4124,8 @@ dissect_nt_rename_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
                fn);
        COUNT_BYTES(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Old Name: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Old Name: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        /* buffer format */
        CHECK_BYTE_COUNT(1);
@@ -4166,10 +4141,8 @@ dissect_nt_rename_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
                fn);
        COUNT_BYTES(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", New Name: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", New Name: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        END_OF_SMB
 
@@ -4206,10 +4179,8 @@ dissect_query_information_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree
                fn);
        COUNT_BYTES(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        END_OF_SMB
 
@@ -4284,10 +4255,8 @@ dissect_set_information_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
                fn);
        COUNT_BYTES(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        END_OF_SMB
 
@@ -4327,8 +4296,7 @@ dissect_read_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
        proto_tree_add_item(tree, hf_smb_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN);
        offset += 4;
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_append_fstr(pinfo->cinfo, COL_INFO,
+       col_append_fstr(pinfo->cinfo, COL_INFO,
                                ", %u byte%s at offset %u", cnt,
                                (cnt == 1) ? "" : "s", ofs);
 
@@ -4572,8 +4540,7 @@ dissect_write_file_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        proto_tree_add_item(tree, hf_smb_offset, tvb, offset, 4, ENC_LITTLE_ENDIAN);
        offset += 4;
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_append_fstr(pinfo->cinfo, COL_INFO,
+       col_append_fstr(pinfo->cinfo, COL_INFO,
                                ", %u byte%s at offset %u", cnt,
                                (cnt == 1) ? "" : "s", ofs);
 
@@ -4652,8 +4619,7 @@ dissect_write_file_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        proto_tree_add_item(tree, hf_smb_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
        offset += 2;
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_append_fstr(pinfo->cinfo, COL_INFO,
+       col_append_fstr(pinfo->cinfo, COL_INFO,
                                ", %u byte%s", cnt, (cnt == 1) ? "" : "s");
 
        if (si->sip && (si->sip->extra_info_type == SMB_EI_RWINFO)) {
@@ -4740,10 +4706,8 @@ dissect_create_temporary_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
                fn);
        COUNT_BYTES(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        END_OF_SMB
 
@@ -5582,10 +5546,8 @@ dissect_search_find_request(tvbuff_t *tvb, packet_info *pinfo,
                fn);
        COUNT_BYTES(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        /* buffer format */
        CHECK_BYTE_COUNT(1);
@@ -6325,10 +6287,8 @@ dissect_open_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
                si->sip->extra_info = fsi;
        }
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        END_OF_SMB
 
@@ -6630,8 +6590,7 @@ dissect_read_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
        ofs = offsethigh;
        ofs = (ofs<<32) | offsetlow;
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_append_fstr(pinfo->cinfo, COL_INFO,
+       col_append_fstr(pinfo->cinfo, COL_INFO,
                                ", %u byte%s at offset %" G_GINT64_MODIFIER "u",
                                maxcnt, (maxcnt == 1) ? "" : "s", ofs);
 
@@ -6772,8 +6731,7 @@ dissect_read_andx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        datalen = (datalen<<16) | datalen_low;
 
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_append_fstr(pinfo->cinfo, COL_INFO,
+       col_append_fstr(pinfo->cinfo, COL_INFO,
                                ", %u byte%s", datalen,
                                (datalen == 1) ? "" : "s");
 
@@ -6901,8 +6859,7 @@ dissect_write_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        ofs = offsethigh;
        ofs = (ofs<<32) | offsetlow;
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_append_fstr(pinfo->cinfo, COL_INFO,
+       col_append_fstr(pinfo->cinfo, COL_INFO,
                                ", %u byte%s at offset %" G_GINT64_MODIFIER "u",
                                datalen, (datalen == 1) ? "" : "s", ofs);
 
@@ -7051,8 +7008,7 @@ dissect_write_andx_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        count = count_high;
        count = (count<<16) | count_low;
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_append_fstr(pinfo->cinfo, COL_INFO,
+       col_append_fstr(pinfo->cinfo, COL_INFO,
                                ", %u byte%s", count,
                                (count == 1) ? "" : "s");
 
@@ -7432,18 +7388,15 @@ dissect_session_setup_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree
                        offset, dn_len, dn);
                COUNT_BYTES(dn_len);
 
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_str(pinfo->cinfo, COL_INFO, ", User: ");
-
-                       if (!dn[0] && !an[0])
-                               col_append_str(pinfo->cinfo, COL_INFO,
-                                               "anonymous");
-                       else
-                               col_append_fstr(pinfo->cinfo, COL_INFO,
-                                               "%s\\%s",
-                                               format_text(dn, strlen(dn)),
-                                               format_text(an, strlen(an)));
-               }
+               col_append_str(pinfo->cinfo, COL_INFO, ", User: ");
+
+               if (!dn[0] && !an[0])
+                       col_append_str(pinfo->cinfo, COL_INFO, "anonymous");
+               else
+                       col_append_fstr(pinfo->cinfo, COL_INFO,
+                                       "%s\\%s",
+                                       format_text(dn, strlen(dn)),
+                                       format_text(an, strlen(an)));
 
                /* OS */
                an = get_unicode_or_ascii_string(tvb, &offset,
@@ -7829,10 +7782,8 @@ dissect_tree_connect_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree
                si->sip->extra_info = se_strdup(an);
        }
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
                    format_text(an, strlen(an)));
-       }
 
        /*
         * NOTE: the Service string is always ASCII, even if the
@@ -9125,10 +9076,9 @@ dissect_nt_transaction_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
                /* primary request */
                subcmd = tvb_get_letohs(tvb, offset);
                proto_tree_add_uint(tree, hf_smb_nt_trans_subcmd, tvb, offset, 2, subcmd);
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
                                val_to_str_ext_const(subcmd, &nt_cmd_vals_ext, "<unknown>"));
-               }
+
                ntd.subcmd = subcmd;
                if (!si->unidir && sip) {
                        if (!pinfo->fd->flags.visited) {
@@ -9650,10 +9600,8 @@ dissect_nt_transaction_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
        /* primary request */
        if (nti != NULL) {
                proto_tree_add_uint(tree, hf_smb_nt_trans_subcmd, tvb, 0, 0, nti->subcmd);
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
                                val_to_str_ext(nti->subcmd, &nt_cmd_vals_ext, "<unknown (%u)>"));
-               }
        } else {
                proto_tree_add_text(tree, tvb, offset, 0,
                        "Function: <unknown function - could not find matching request>");
@@ -10358,10 +10306,8 @@ dissect_nt_create_andx_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
                si->sip->extra_info      = fsi;
        }
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        END_OF_SMB
 
@@ -11008,10 +10954,8 @@ dissect_get_dfs_request_data(tvbuff_t *tvb, packet_info *pinfo,
                fn);
        COUNT_BYTES_TRANS(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s",
                    format_text(fn, strlen(fn)));
-       }
 
        *bcp = bc;
        return offset;
@@ -11097,10 +11041,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
                        fn);
                COUNT_BYTES_TRANS(fn_len);
 
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
                            format_text(fn, strlen(fn)));
-               }
                break;
        case 0x0001:    /*TRANS2_FIND_FIRST2*/
                /* Search Attributes */
@@ -11141,10 +11083,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
                        fn);
                COUNT_BYTES_TRANS(fn_len);
 
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ", Pattern: %s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", Pattern: %s",
                            format_text(fn, strlen(fn)));
-               }
 
                break;
        case 0x0002:    /*TRANS2_FIND_NEXT2*/
@@ -11183,10 +11123,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
                        fn);
                COUNT_BYTES_TRANS(fn_len);
 
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ", Continue: %s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", Continue: %s",
                            format_text(fn, strlen(fn)));
-               }
 
                break;
        case 0x0003:    /*TRANS2_QUERY_FS_INFORMATION*/
@@ -11198,8 +11136,7 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
                proto_tree_add_uint(tree, hf_smb_qfsi_information_level, tvb, offset, 2, si->info_level);
                COUNT_BYTES_TRANS(2);
 
-               if (check_col(pinfo->cinfo, COL_INFO))
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
                                        val_to_str(si->info_level, qfsi_vals,
                                                   "Unknown (0x%02x)"));
 
@@ -11213,8 +11150,7 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
                proto_tree_add_uint(tree, hf_smb_sfsi_information_level, tvb, offset+2, 2, si->info_level);
                COUNT_BYTES_TRANS(4);
 
-               if (check_col(pinfo->cinfo, COL_INFO))
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
                                        val_to_str(si->info_level, sfsi_vals,
                                                   "Unknown (0x%02x)"));
 
@@ -11228,12 +11164,10 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
                proto_tree_add_uint(tree, hf_smb_qpi_loi, tvb, offset, 2, si->info_level);
                COUNT_BYTES_TRANS(2);
 
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(
+               col_append_fstr(
                                pinfo->cinfo, COL_INFO, ", %s",
                                val_to_str(si->info_level, qpi_loi_vals,
                                           "Unknown (%u)"));
-               }
 
                /* 4 reserved bytes */
                CHECK_BYTE_COUNT_TRANS(4);
@@ -11254,10 +11188,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
                        t2i->name = se_strdup(fn);
                }
 
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
                            format_text(fn, strlen(fn)));
-               }
 
                break;
        case 0x0006:    /*TRANS2_SET_PATH_INFORMATION*/
@@ -11281,10 +11213,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
                        fn);
                COUNT_BYTES_TRANS(fn_len);
 
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
                            format_text(fn, strlen(fn)));
-               }
 
                break;
        case 0x0007: {  /*TRANS2_QUERY_FILE_INFORMATION*/
@@ -11304,12 +11234,10 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
                proto_tree_add_uint(tree, hf_smb_qpi_loi, tvb, offset, 2, si->info_level);
                COUNT_BYTES_TRANS(2);
 
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(
+               col_append_fstr(
                                pinfo->cinfo, COL_INFO, ", %s",
                                val_to_str(si->info_level, qpi_loi_vals,
                                           "Unknown (%u)"));
-               }
 
                break;
        }
@@ -11411,10 +11339,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
                        fn);
                COUNT_BYTES_TRANS(fn_len);
 
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", Path: %s",
                            format_text(fn, strlen(fn)));
-               }
 
                break;
        case 0x000c:    /*TRANS2_FIND_NOTIFY_NEXT*/
@@ -11443,10 +11369,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
                        fn);
                COUNT_BYTES_TRANS(fn_len);
 
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ", Dir: %s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", Dir: %s",
                            format_text(fn, strlen(fn)));
-               }
                break;
        case 0x000e:    /*TRANS2_SESSION_SETUP*/
                /* XXX unknown structure*/
@@ -11462,11 +11386,8 @@ dissect_transaction2_request_parameters(tvbuff_t *tvb, packet_info *pinfo,
                        fn);
                COUNT_BYTES_TRANS(fn_len);
 
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", File: %s",
                            format_text(fn, strlen(fn)));
-               }
-
                break;
        }
 
@@ -14107,11 +14028,10 @@ dissect_transaction_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                                subcmd = tvb_get_letohs(tvb, offset);
                                proto_tree_add_uint(tree, hf_smb_trans2_subcmd,
                                    tvb, offset, 2, subcmd);
-                               if (check_col(pinfo->cinfo, COL_INFO)) {
-                                       col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
+                               col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
                                            val_to_str_ext(subcmd, &trans2_cmd_vals_ext,
                                                           "Unknown (0x%02x)"));
-                               }
+
                                if (!si->unidir) {
                                        if (!pinfo->fd->flags.visited && si->sip) {
                                                /*
@@ -14459,10 +14379,8 @@ dissect_4_3_4_1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
                fn);
        COUNT_BYTES_SUBR(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
                    format_text(fn, strlen(fn)));
-       }
 
        proto_item_append_text(item, " File: %s", format_text(fn, strlen(fn)));
        proto_item_set_len(item, offset-old_offset);
@@ -14578,10 +14496,8 @@ dissect_4_3_4_2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
                fn);
        COUNT_BYTES_SUBR(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
                    format_text(fn, strlen(fn)));
-       }
 
        proto_item_append_text(item, " File: %s", format_text(fn, strlen(fn)));
        proto_item_set_len(item, offset-old_offset);
@@ -14699,10 +14615,8 @@ dissect_4_3_4_3(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
                fn);
        COUNT_BYTES_SUBR(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
                    format_text(fn, strlen(fn)));
-       }
 
        proto_item_append_text(item, " File: %s", format_text(fn, strlen(fn)));
        proto_item_set_len(item, offset-old_offset);
@@ -14791,10 +14705,8 @@ dissect_4_3_4_4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
                fn);
        COUNT_BYTES_SUBR(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
                    format_text(fn, strlen(fn)));
-       }
 
        /* skip to next structure */
        if (neo) {
@@ -14905,10 +14817,8 @@ dissect_4_3_4_5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
                fn);
        COUNT_BYTES_SUBR(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
                    format_text(fn, strlen(fn)));
-       }
 
        /* skip to next structure */
        if (neo) {
@@ -15045,10 +14955,8 @@ dissect_4_3_4_6(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
                fn);
        COUNT_BYTES_SUBR(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
                    format_text(fn, strlen(fn)));
-       }
 
        /* skip to next structure */
        if (neo) {
@@ -15174,10 +15082,8 @@ dissect_4_3_4_6full(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
                fn);
        COUNT_BYTES_SUBR(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
                    format_text(fn, strlen(fn)));
-       }
 
        /* skip to next structure */
        if (neo) {
@@ -15324,10 +15230,8 @@ dissect_4_3_4_6_id_both(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tr
                fn);
        COUNT_BYTES_SUBR(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
                    format_text(fn, strlen(fn)));
-       }
 
        /* skip to next structure */
        if (neo) {
@@ -15412,10 +15316,8 @@ dissect_4_3_4_7(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree,
                fn);
        COUNT_BYTES_SUBR(fn_len);
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
                    format_text(fn, strlen(fn)));
-       }
 
        /* skip to next structure */
        if (neo) {
@@ -16187,7 +16089,7 @@ dissect_transaction2_response_data(tvbuff_t *tvb, packet_info *pinfo,
                        break;
                }
 
-               if (count && check_col(pinfo->cinfo, COL_INFO)) {
+               if (count) {
                        col_append_str(pinfo->cinfo, COL_INFO,
                                       ", Files:");
                }
@@ -16206,7 +16108,7 @@ dissect_transaction2_response_data(tvbuff_t *tvb, packet_info *pinfo,
                if (count == -1) {
                        break;
                }
-               if (count && check_col(pinfo->cinfo, COL_INFO)) {
+               if (count) {
                        col_append_str(pinfo->cinfo, COL_INFO,
                                       ", Files:");
                }
@@ -16675,12 +16577,10 @@ dissect_transaction_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
                                        break;
                                }
 
-                               if (check_col(pinfo->cinfo, COL_INFO)) {
-                                       col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
+                               col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
                                                val_to_str_ext(t2i->subcmd,
                                                               &trans2_cmd_vals_ext,
                                                               "<unknown (0x%02x)>"));
-                               }
                        }
                }
                break;
@@ -17289,18 +17189,15 @@ dissect_smb_command(tvbuff_t *tvb, packet_info *pinfo, int offset, proto_tree *s
                proto_tree *cmd_tree;
                int (*dissector)(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, proto_tree *smb_tree);
 
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       if (first_pdu) {
-                               col_append_fstr(pinfo->cinfo, COL_INFO,
-                                       "%s %s",
-                                       decode_smb_name(cmd),
-                                       (si->request)? "Request" : "Response");
-                       } else {
-                               col_append_fstr(pinfo->cinfo, COL_INFO,
-                                       "; %s",
-                                       decode_smb_name(cmd));
-                       }
-
+               if (first_pdu) {
+                       col_append_fstr(pinfo->cinfo, COL_INFO,
+                               "%s %s",
+                               decode_smb_name(cmd),
+                               (si->request)? "Request" : "Response");
+               } else {
+                       col_append_fstr(pinfo->cinfo, COL_INFO,
+                               "; %s",
+                               decode_smb_name(cmd));
                }
 
                cmd_item = proto_tree_add_text(smb_tree, tvb, offset, -1,
@@ -18466,7 +18363,7 @@ dissect_smb(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
        dissect_smb_command(tvb, pinfo, offset, tree, si->cmd, TRUE);
 
        /* Append error info from this packet to info string. */
-       if (!si->request && check_col(pinfo->cinfo, COL_INFO)) {
+       if (!si->request) {
                if (flags2 & 0x4000) {
                        /*
                         * The status is an NT status code; was there
index 21acebdd181498dc15ea9618c3ace64c9eaef782..7cd4446877abd85a42e0466c665fbc9d31ad0c9f 100644 (file)
@@ -1295,14 +1295,14 @@ dissect_smb2_ioctl_function(tvbuff_t *tvb, packet_info *pinfo, proto_tree *paren
                        ioctl_name = NULL;
                }
 
-               if (check_col(pinfo->cinfo, COL_INFO) && ioctl_name != NULL) {
+               if (ioctl_name != NULL) {
                        col_append_fstr(
                                pinfo->cinfo, COL_INFO, " %s", ioctl_name);
                }
 
                /* device */
                proto_tree_add_item(tree, hf_smb2_ioctl_function_device, tvb, offset, 4, ENC_LITTLE_ENDIAN);
-               if (check_col(pinfo->cinfo, COL_INFO) && ioctl_name == NULL) {
+               if (ioctl_name == NULL) {
                        col_append_fstr(
                                pinfo->cinfo, COL_INFO, " %s",
                                val_to_str((ioctl_function>>16)&0xffff, smb2_ioctl_device_vals,
@@ -1314,7 +1314,7 @@ dissect_smb2_ioctl_function(tvbuff_t *tvb, packet_info *pinfo, proto_tree *paren
 
                /* function */
                proto_tree_add_item(tree, hf_smb2_ioctl_function_function, tvb, offset, 4, ENC_LITTLE_ENDIAN);
-               if (check_col(pinfo->cinfo, COL_INFO) && ioctl_name == NULL) {
+               if (ioctl_name == NULL) {
                        col_append_fstr(
                                pinfo->cinfo, COL_INFO, " Function:0x%04x",
                                (ioctl_function>>2)&0x0fff);
@@ -1407,9 +1407,7 @@ dissect_smb2_fid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset
                        if (hnd_item) {
                                proto_item_append_text(hnd_item, " %s", fid_name);
                        }
-                       if (check_col(pinfo->cinfo, COL_INFO)) {
-                               col_append_fstr(pinfo->cinfo, COL_INFO, " %s", fid_name);
-                       }
+                       col_append_fstr(pinfo->cinfo, COL_INFO, " %s", fid_name);
                }
 
                /* look for the eo_file_info */
@@ -2004,10 +2002,7 @@ dissect_smb2_file_rename_info(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree
                                offset, length, name);
                }
 
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, " NewName:%s",
-                       name);
-               }
+               col_append_fstr(pinfo->cinfo, COL_INFO, " NewName:%s", name);
        }
        offset += length;
 
@@ -2578,10 +2573,7 @@ dissect_smb2_tree_connect_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree
                g_snprintf((char *)si->saved->extra_info,olb.len+1,"%s",buf);
        }
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " Tree: %s", buf);
-       }
-
+       col_append_fstr(pinfo->cinfo, COL_INFO, " Tree: %s", buf);
 
        return offset;
 }
@@ -2847,11 +2839,9 @@ dissect_smb2_find_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
                g_snprintf((char *)si->saved->extra_info,olb.len+1,"%s",buf);
        }
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %s Pattern: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, " %s Pattern: %s",
                        val_to_str(il, smb2_find_info_levels, "(Level:0x%02x)"),
                        buf);
-       }
 
        return offset;
 }
@@ -3355,11 +3345,9 @@ dissect_smb2_find_response(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr
        }
 
        if (!pinfo->fd->flags.visited && si->saved && si->saved->extra_info_type == SMB2_EI_FINDPATTERN) {
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, " %s Pattern: %s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, " %s Pattern: %s",
                                val_to_str(si->saved->infolevel, smb2_find_info_levels, "(Level:0x%02x)"),
                                (const char *)si->saved->extra_info);
-               }
 
                g_free(si->saved->extra_info);
                si->saved->extra_info_type = SMB2_EI_NONE;
@@ -3593,11 +3581,9 @@ dissect_smb2_class_infolevel(packet_info *pinfo, tvbuff_t *tvb, int offset, prot
                 * display ab bit too much if we do it for replies
                 * as well.
                 */
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, " %s/%s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, " %s/%s",
                                val_to_str(cl, smb2_class_vals, "(Class:0x%02x)"),
                                val_to_str(il, vs, "(Level:0x%02x)"));
-               }
        }
 
        return offset;
@@ -4056,9 +4042,7 @@ dissect_smb2_write_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        proto_tree_add_item(tree, hf_smb2_file_offset, tvb, offset, 8, ENC_LITTLE_ENDIAN);
        offset += 8;
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " Len:%d Off:%" G_GINT64_MODIFIER "u", length, off);
-       }
+       col_append_fstr(pinfo->cinfo, COL_INFO, " Len:%d Off:%" G_GINT64_MODIFIER "u", length, off);
 
        /* fid */
        offset = dissect_smb2_fid(tvb, pinfo, tree, offset, si, FID_MODE_USE);
@@ -4843,9 +4827,7 @@ dissect_smb2_read_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, i
        proto_tree_add_item(tree, hf_smb2_file_offset, tvb, offset, 8, ENC_LITTLE_ENDIAN);
        offset += 8;
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " Len:%d Off:%" G_GINT64_MODIFIER "u", len, off);
-       }
+       col_append_fstr(pinfo->cinfo, COL_INFO, " Len:%d Off:%" G_GINT64_MODIFIER "u", len, off);
 
        /* fid */
        offset = dissect_smb2_fid(tvb, pinfo, tree, offset, si, FID_MODE_USE);
@@ -5568,9 +5550,7 @@ dissect_smb2_create_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 
        /* filename string */
        fname = dissect_smb2_olb_string(pinfo, tree, tvb, &f_olb, OLB_TYPE_UNICODE_STRING);
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_append_fstr(pinfo->cinfo, COL_INFO, " File: %s", fname);
-       }
+       col_append_fstr(pinfo->cinfo, COL_INFO, " File: %s", fname);
 
        /* save the name if it looks sane */
        if (!pinfo->fd->flags.visited) {
@@ -6828,13 +6808,11 @@ dissect_smb2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, gboolea
        sti->conv = si->conv;
 
        col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMB2");
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               if (first_in_chain) {
-                       /* first packet */
-                       col_clear(pinfo->cinfo, COL_INFO);
-               } else {
-                       col_append_str(pinfo->cinfo, COL_INFO, ";");
-               }
+       if (first_in_chain) {
+               /* first packet */
+               col_clear(pinfo->cinfo, COL_INFO);
+       } else {
+               col_append_str(pinfo->cinfo, COL_INFO, ";");
        }
 
        if (parent_tree) {
@@ -6932,16 +6910,14 @@ dissect_smb2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, gboolea
                proto_item_set_len(header_item, offset);
 
 
-               if (check_col(pinfo->cinfo, COL_INFO)) {
-                       col_append_fstr(pinfo->cinfo, COL_INFO, "%s %s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, "%s %s",
                                decode_smb2_name(si->opcode),
                                (si->flags & SMB2_FLAGS_RESPONSE)?"Response":"Request");
-                       if (si->status) {
-                               col_append_fstr(
+               if (si->status) {
+                       col_append_fstr(
                                        pinfo->cinfo, COL_INFO, ", Error: %s",
                                        val_to_str(si->status, NT_errors,
                                        "Unknown (0x%08X)"));
-                       }
                }
 
 
index a256e8848bc8388f19f3132eac7e817ae284c08b..7e78c6afba3b48d828e90415af838f6f5d245143 100644 (file)
@@ -2496,27 +2496,25 @@ dissect_smpp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         /*
          * Make entries in the Info column on the summary display
          */
-        if (check_col(pinfo->cinfo, COL_INFO)) {
-            if (first == TRUE) {
-                /*
-                 * First PDU - We already computed the fixed header
-                 */
-                col_clear(pinfo->cinfo, COL_INFO);
-                col_add_fstr(pinfo->cinfo, COL_INFO, "SMPP %s", command_str);
-                first = FALSE;
-            } else {
-                /*
-                 * Subsequent PDUs
-                 */
-                col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", command_str);
-            }
+        if (first == TRUE) {
             /*
-             * Display command status of responses in Info column
-             */
-            if (command_id & 0x80000000) {
-                col_append_fstr(pinfo->cinfo, COL_INFO, ": \"%s\"",
-                        command_status_str);
-            }
+                * First PDU - We already computed the fixed header
+                */
+            col_clear(pinfo->cinfo, COL_INFO);
+            col_add_fstr(pinfo->cinfo, COL_INFO, "SMPP %s", command_str);
+            first = FALSE;
+        } else {
+            /*
+                * Subsequent PDUs
+                */
+            col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", command_str);
+        }
+        /*
+            * Display command status of responses in Info column
+            */
+        if (command_id & 0x80000000) {
+            col_append_fstr(pinfo->cinfo, COL_INFO, ": \"%s\"",
+                    command_status_str);
         }
 
         /*
index b611b134f749233d0f2c5ed61df23618093f8474..d74806fe08bdbe40c5743871571d61245fcfc2ac 100644 (file)
@@ -523,8 +523,7 @@ dissect_smrse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *
        }
 
        col_set_str(pinfo->cinfo, COL_PROTOCOL, "SMRSE");
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_add_str(pinfo->cinfo, COL_INFO, val_to_str(tag, tag_vals,"Unknown Tag:0x%02x"));
+       col_add_str(pinfo->cinfo, COL_INFO, val_to_str(tag, tag_vals,"Unknown Tag:0x%02x"));
 
        proto_tree_add_item(tree, hf_smrse_reserved, tvb, 0, 1, ENC_BIG_ENDIAN);
        proto_tree_add_item(tree, hf_smrse_length, tvb, 1, 2, ENC_BIG_ENDIAN);
index fdddfea2bb0f364763e54cea0ccd0cece503b690..f73fc48e5adc95945f3a665f96f53aa2d71526c6 100644 (file)
@@ -1540,8 +1540,7 @@ dissect_xid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        format = hi_nibble(type);
 
        /* Summary information */
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_add_fstr(pinfo->cinfo, COL_INFO,
+       col_add_fstr(pinfo->cinfo, COL_INFO,
                    "SNA XID Format:%d Type:%s", format,
                    val_to_str_const(lo_nibble(type), sna_xid_type_vals,
                    "Unknown Type"));
@@ -2153,8 +2152,7 @@ dissect_fid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        th_fid = hi_nibble(tvb_get_guint8(tvb, 0));
 
        /* Summary information */
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_add_str(pinfo->cinfo, COL_INFO,
+       col_add_str(pinfo->cinfo, COL_INFO,
                    val_to_str(th_fid, sna_th_fid_vals, "Unknown FID: %01x"));
 
        if (tree) {
index 1f2d34de3079d51765b4ff26035a555f0ed7009b..484674652130f7620965bbb4d51e99e0ee91353c 100644 (file)
@@ -275,8 +275,7 @@ dissect_sndcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
      */
     if (!unack) {
       npdu = npdu_field1 = tvb_get_guint8(tvb,offset);
-      if (check_col(pinfo->cinfo, COL_INFO))
-        col_add_fstr(pinfo->cinfo, COL_INFO, "SN-DATA N-PDU %d", npdu_field1);
+      col_add_fstr(pinfo->cinfo, COL_INFO, "SN-DATA N-PDU %d", npdu_field1);
       if (tree) {
         npdu_field_item = proto_tree_add_text(sndcp_tree, tvb, offset,1, "Acknowledged mode, N-PDU %d", npdu_field1 );
         npdu_field_tree = proto_item_add_subtree(npdu_field_item, ett_sndcp_npdu_field);
@@ -292,8 +291,7 @@ dissect_sndcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     npdu_field2     = tvb_get_ntohs(tvb, offset);
     segment         = (npdu_field2 & 0xF000) >> 12;
     npdu            = (npdu_field2 & 0x0FFF);
-    if (check_col(pinfo->cinfo, COL_INFO))
-      col_add_fstr(pinfo->cinfo, COL_INFO, "SN-UNITDATA N-PDU %d (segment %d)", npdu, segment);
+    col_add_fstr(pinfo->cinfo, COL_INFO, "SN-UNITDATA N-PDU %d (segment %d)", npdu, segment);
     if (tree) {
       npdu_field_item = proto_tree_add_text(sndcp_tree, tvb, offset,2, "Unacknowledged mode, N-PDU %d (segment %d)", npdu, segment );
       npdu_field_tree = proto_item_add_subtree(npdu_field_item, ett_sndcp_npdu_field);
@@ -352,11 +350,9 @@ dissect_sndcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       else {
         /* Not reassembled in this packet
          */
-        if (check_col(pinfo->cinfo, COL_INFO)) {
-          col_append_fstr(pinfo->cinfo, COL_INFO,
+        col_append_fstr(pinfo->cinfo, COL_INFO,
                           " (N-PDU payload reassembled in packet %u)",
                           fd_npdu->reassembled_in);
-        }
         if (tree) {
           proto_tree_add_text(sndcp_tree, tvb, offset, -1, "Payload");
         }
@@ -364,12 +360,11 @@ dissect_sndcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     } else {
       /* Not reassembled yet, or not reassembled at all
        */
-      if (check_col(pinfo->cinfo, COL_INFO)) {
-        if (unack)
-          col_append_fstr(pinfo->cinfo, COL_INFO, " (Unreassembled fragment %u)", segment);
-        else
-          col_append_str(pinfo->cinfo, COL_INFO, " (Unreassembled fragment)");
-      }
+      if (unack)
+        col_append_fstr(pinfo->cinfo, COL_INFO, " (Unreassembled fragment %u)", segment);
+      else
+        col_append_str(pinfo->cinfo, COL_INFO, " (Unreassembled fragment)");
+
       if (tree) {
         proto_tree_add_text(sndcp_tree, tvb, offset, -1, "Payload");
       }
index 6648779dbd4bf1346060afa48db709ea9e484a84..c2d59d9557c32d9597ab2156f341f0def18d0373 100644 (file)
@@ -126,8 +126,7 @@ dissect_spp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
        conn_ctrl = tvb_get_guint8(tvb, 0);
        spp_msg_string = spp_conn_ctrl(conn_ctrl);
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_append_fstr(pinfo->cinfo, COL_INFO, " %s", spp_msg_string);
+       col_append_fstr(pinfo->cinfo, COL_INFO, " %s", spp_msg_string);
        if (tree) {
                ti = proto_tree_add_uint_format(spp_tree, hf_spp_connection_control, tvb,
                                                0, 1, conn_ctrl,
@@ -147,9 +146,7 @@ dissect_spp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        datastream_type = tvb_get_guint8(tvb, 1);
        datastream_type_string = spp_datastream(datastream_type);
        if (datastream_type_string != NULL) {
-               if (check_col(pinfo->cinfo, COL_INFO))
-                       col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
-                           datastream_type_string);
+               col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", datastream_type_string);
        }
        if (tree) {
                if (datastream_type_string != NULL) {
index 3aa843385c741633a9ab1623de9366f8cd4908d6..84c14eea5d3411590b6a37156e0a057113782e7f 100644 (file)
@@ -832,9 +832,8 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
     version = tvb_get_guint8(tvb, offset);
     function = tvb_get_guint8(tvb, offset + 1);
 
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_add_str(pinfo->cinfo, COL_INFO,
-            val_to_str(function, srvloc_functions, "Unknown Function (%u)"));
+    col_add_str(pinfo->cinfo, COL_INFO,
+        val_to_str(function, srvloc_functions, "Unknown Function (%u)"));
 
     ti = proto_tree_add_item(tree, proto_srvloc, tvb, offset, -1, ENC_NA);
     srvloc_tree = proto_item_add_subtree(ti, ett_srvloc);
@@ -872,8 +871,7 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
         proto_tree_add_text(srvloc_tree, tvb, offset + 10, 2, "Transaction ID: %u",
                             tvb_get_ntohs(tvb, offset + 10));
         /* added echo of XID to info colomn by Greg Morris 0ct 14, 2005 */
-        if (check_col(pinfo->cinfo, COL_INFO))
-            col_append_fstr(pinfo->cinfo, COL_INFO, ", V1 Transaction ID - %u", tvb_get_ntohs(tvb, offset + 10));
+        col_append_fstr(pinfo->cinfo, COL_INFO, ", V1 Transaction ID - %u", tvb_get_ntohs(tvb, offset + 10));
 
         offset += 12;
 
@@ -1085,8 +1083,7 @@ dissect_srvloc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _
                             next_ext_off);
         proto_tree_add_uint(srvloc_tree, hf_srvloc_xid, tvb, offset + 10, 2,
                             tvb_get_ntohs(tvb, offset + 10));
-        if (check_col(pinfo->cinfo, COL_INFO))
-            col_append_fstr(pinfo->cinfo, COL_INFO, ", V2 XID - %u", tvb_get_ntohs(tvb, offset + 10));
+        col_append_fstr(pinfo->cinfo, COL_INFO, ", V2 XID - %u", tvb_get_ntohs(tvb, offset + 10));
         lang_tag_len = tvb_get_ntohs(tvb, offset + 12);
         proto_tree_add_uint(srvloc_tree, hf_srvloc_langtaglen, tvb, offset + 12, 2, lang_tag_len);
         proto_tree_add_item(srvloc_tree, hf_srvloc_langtag, tvb, offset + 14, lang_tag_len, ENC_ASCII|ENC_NA);
index 4fcf895242db888dcbfd78453ef4013005240b89..03d4ef7b956ca2252391b82875e83ced2292a021 100644 (file)
@@ -92,8 +92,7 @@ dissect_sscf_nni(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     sscf_status = tvb_get_guint8(tvb, SSCF_STATUS_OFFSET);
 
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "SSCF-NNI");
-    if (check_col(pinfo->cinfo, COL_INFO))
-      col_add_fstr(pinfo->cinfo, COL_INFO, "STATUS (%s) ",
+    col_add_fstr(pinfo->cinfo, COL_INFO, "STATUS (%s) ",
                   val_to_str_const(sscf_status, sscf_status_vals, "Unknown"));
 
 
index faf982b90b6509a0b7b8a4a3412bea121b4290fb..67cab7a00ad0adb6cbf11208c59c5b4c431458c6 100644 (file)
@@ -191,8 +191,7 @@ dissect_sscop_and_payload(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, d
   sscop_info.type = sscop_pdu_type & SSCOP_TYPE_MASK;
 
   col_set_str(pinfo->cinfo, COL_PROTOCOL, "SSCOP");
-  if (check_col(pinfo->cinfo, COL_INFO))
-    col_add_str(pinfo->cinfo, COL_INFO, val_to_str(sscop_info.type, sscop_type_vals,
+  col_add_str(pinfo->cinfo, COL_INFO, val_to_str(sscop_info.type, sscop_type_vals,
                                        "Unknown PDU type (0x%02x)"));
 
   /*
index 5597c2a461e66adc28b4b172f28560ac01972f8e..1be3219c118f127580c3015d24af4ec554796288 100644 (file)
@@ -490,14 +490,13 @@ dissect_starteam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
   col_set_str(pinfo->cinfo, COL_PROTOCOL, "StarTeam");
 
-  if(check_col(pinfo->cinfo, COL_INFO)){
-    /* This is a trick to know whether this is the first PDU in this packet or not */
-    if(iPreviousFrameNumber != (gint) pinfo->fd->num){
-      col_clear(pinfo->cinfo, COL_INFO);
-    } else {
-      col_append_str(pinfo->cinfo, COL_INFO, " | ");
-    }
+  /* This is a trick to know whether this is the first PDU in this packet or not */
+  if(iPreviousFrameNumber != (gint) pinfo->fd->num){
+    col_clear(pinfo->cinfo, COL_INFO);
+  } else {
+    col_append_str(pinfo->cinfo, COL_INFO, " | ");
   }
+
   iPreviousFrameNumber = pinfo->fd->num;
   if(tvb_length(tvb) >= 16){
     guint32 iCommand = 0;
@@ -514,10 +513,8 @@ dissect_starteam(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
       if(tvb_length_remaining(tvb, offset) >= 66){
         iCommand = tvb_get_letohl(tvb, offset + 62);
       }
-      if(check_col(pinfo->cinfo, COL_INFO)){
-        col_append_str(pinfo->cinfo, COL_INFO,
+      col_append_str(pinfo->cinfo, COL_INFO,
                        val_to_str_ext(iCommand, &starteam_opcode_vals_ext, "Unknown (0x%02x)"));
-      }
     }
 
     if(tree){
index 35ee0eb740a00a10992f381afc50d7912049ed37..545fdba70fcb493c9c8f6f6d0f6b2f9e3b4c3709 100644 (file)
@@ -512,15 +512,12 @@ static void dissect_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                return;
 
        /* write the protocol name to the info column */
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
-               col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTOCOL_SHORT_NAME);
+       col_set_str(pinfo->cinfo, COL_PROTOCOL, PROTOCOL_SHORT_NAME);
 
        frame_type = tvb_get_guint8(tvb, 1) >> 4;
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_clear(pinfo->cinfo, COL_INFO); /* clear out stuff in the info column */
-               col_add_fstr(pinfo->cinfo, COL_INFO, "%s", val_to_str_const(frame_type, typenames, "invalid packet type"));
-       }
+       col_clear(pinfo->cinfo, COL_INFO); /* clear out stuff in the info column */
+       col_add_fstr(pinfo->cinfo, COL_INFO, "%s", val_to_str_const(frame_type, typenames, "invalid packet type"));
 
        /* CFG-2 and DATA frames need special treatment during the first run:
         * For CFG-2 frames, a 'config_frame' struct is created to hold the
@@ -863,17 +860,17 @@ static int dissect_command_frame(tvbuff_t    *tvb,
 {
        proto_tree *command_tree  = NULL;
        guint       tvbsize       = tvb_length(tvb);
+       const char *s;
 
        proto_item_set_text(command_item, "Command data");
        command_tree = proto_item_add_subtree(command_item, ett_command);
 
        /* CMD */
        proto_tree_add_item(command_tree, hf_command, tvb, 0, 2, ENC_BIG_ENDIAN);
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               const char *s = val_to_str_const(tvb_get_ntohs(tvb, 0), command_names, "invalid command");
-               col_append_str(pinfo->cinfo, COL_INFO, ", ");
-               col_append_str(pinfo->cinfo, COL_INFO, s);
-       }
+
+       s = val_to_str_const(tvb_get_ntohs(tvb, 0), command_names, "invalid command");
+       col_append_str(pinfo->cinfo, COL_INFO, ", ");
+       col_append_str(pinfo->cinfo, COL_INFO, s);
 
        if (tvbsize > 2) {
                if (tvb_get_ntohs(tvb, 0) == 0x0008) {
index 0530ea21382607905027be5e2b445fa376fb88ef..f0df66e261743544872973a2dc01457901240f4a 100644 (file)
@@ -260,7 +260,7 @@ dissect_syslog(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   mtp3_tvb = mtp3_msu_present(tvb, pinfo, fac, lev, msg_str,
                              (reported_msg_len - msg_len));
 
-  if (mtp3_tvb == NULL && check_col(pinfo->cinfo, COL_INFO)) {
+  if (mtp3_tvb == NULL) {
     if (pri >= 0) {
       col_add_fstr(pinfo->cinfo, COL_INFO, "%s.%s: %s",
         val_to_str_const(fac, short_fac, "UNKNOWN"),
index e8e694b8b246924e8d669a24c5bc94232a5530b0..375ba6b530dacbd346d862d9bfc61be86782a1f2 100644 (file)
@@ -105,10 +105,8 @@ dissect_tali_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
   /* Make entries in Protocol column on summary display */
   col_set_str(pinfo->cinfo, COL_PROTOCOL, "TALI");
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-    col_set_str(pinfo->cinfo, COL_INFO, "");
-    col_append_fstr(pinfo->cinfo, COL_INFO, "[%s] packet, [%u] bytes in payload", opcode, length);
-  }
+  col_set_str(pinfo->cinfo, COL_INFO, "");
+  col_append_fstr(pinfo->cinfo, COL_INFO, "[%s] packet, [%u] bytes in payload", opcode, length);
 
   if (tree) {
     /* create display subtree for the protocol */
index eaafa8a7230c50a5992ca0eb85293f56f6351cd4..34d95b051d754e5053007d1d480d127219d7d575 100644 (file)
@@ -153,8 +153,7 @@ dissect_tapa_discover_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tapa_
        proto_tree_add_item(tapa_discover_tree, hf_tapa_discover_reply_switchip, tvb, offset, 4,
                ENC_BIG_ENDIAN);
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", Switch: %s",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", Switch: %s",
                        tvb_ip_to_str(tvb, offset));
 
        offset += 4;
@@ -193,11 +192,10 @@ dissect_tapa_discover_req(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tapa_di
 
                DISSECTOR_ASSERT(item_length > 0);
 
-               if (check_col(pinfo->cinfo, COL_INFO))
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ", %s: %s",
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", %s: %s",
                                item_type_text, item_text);
 
-               item = proto_tree_add_text(tapa_discover_tree, tvb, offset, 4 + item_length,
+               item = proto_tree_add_text(tapa_discover_tree, tvb, offset, 4 + item_length,
                        "Type %d = %s, length %d, value %s",
                        item_type, item_type_text, item_length, item_text);
 
@@ -247,11 +245,10 @@ dissect_tapa_discover_unknown_new_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_t
                else
                        item_text = "BINARY-DATA";
 
-               if (check_col(pinfo->cinfo, COL_INFO))
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ", T=%d L=%d",
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", T=%d L=%d",
                                item_type, item_length);
 
-               item = proto_tree_add_text(tapa_discover_tree, tvb, offset, 4 + item_length,
+        item = proto_tree_add_text(tapa_discover_tree, tvb, offset, 4 + item_length,
                        "Type %d, length %d, value %s",
                        item_type, item_length, item_text);
 
@@ -297,8 +294,7 @@ dissect_tapa_discover(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        DISSECTOR_ASSERT(remaining > 4);
 
        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",
+       col_add_fstr(pinfo->cinfo, COL_INFO, "Discover - %s",
                        val_to_str(packet_type, tapa_discover_type_vals, "Unknown (%d)"));
 
        if (tree) {
@@ -356,8 +352,7 @@ dissect_tapa_tunnel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        remaining = tvb_reported_length(tvb);
 
        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,
+       col_add_fstr(pinfo->cinfo, COL_INFO, "Tunnel - V=%d, T=%s", version >> 4,
                        val_to_str(type, tapa_tunnel_type_vals, "Unknown (%d)"));
 
        if (tree) {
index a548302d9cd52a74cf7e2df832db34c51c3379f5..80511315c70bdf10eace1a19e006290761c3885d 100644 (file)
@@ -3422,7 +3422,7 @@ dissect_tcpopt_rvbd_probe(const ip_tcp_opt *optp _U_, tvbuff_t *tvb, int offset,
 
             proto_item_append_text(pitem, ", CSH IP: %s", ip_to_str((guint8 *)&ip));
 
-            if (check_col(pinfo->cinfo, COL_INFO)) {
+            {
                 /* Small look-ahead hack to distinguish S+ from S+* */
 #define PROBE_V1_QUERY_LEN    10
                 const guint8 qinfo_hdr[] = { 0x4c, 0x04, 0x0c };
@@ -3518,7 +3518,6 @@ dissect_tcpopt_rvbd_probe(const ip_tcp_opt *optp _U_, tvbuff_t *tvb, int offset,
                                     4, ENC_BIG_ENDIAN);
 
             if (type != PROBE_QUERY_INFO_SID &&
-                check_col(pinfo->cinfo, COL_INFO) &&
                 (tvb_get_guint8(tvb, 13) & (TH_SYN|TH_ACK)) == (TH_SYN|TH_ACK) &&
                 (flags & RVBD_FLAGS_PROBE_LAST)) {
                 col_prepend_fstr(pinfo->cinfo, COL_INFO, "SA++, ");
@@ -4339,7 +4338,7 @@ dissect_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     } else
         tcph->th_have_seglen = FALSE;
 
-    if (check_col(pinfo->cinfo, COL_INFO) || tree) {
+    if (tree) {
         gboolean first_flag = TRUE;
         for (i = 0; i < 9; i++) {
             bpos = 1 << i;
index 27b12be66de384845d6e96496def331ef2fc1375..7204f0f7660930f3e75bb8c31bffc95a78084f00 100644 (file)
@@ -440,7 +440,7 @@ static void ts2_standard_dissect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
         }
         else
         { /* Not last packet of reassembled Short Message */
-            if (check_col(pinfo->cinfo, COL_INFO))col_append_fstr(pinfo->cinfo, COL_INFO," (Message fragment %u)", frag->frag_num);
+            col_append_fstr(pinfo->cinfo, COL_INFO," (Message fragment %u)", frag->frag_num);
         }
         if (new_tvb)
             next_tvb = new_tvb;
index f035066c9711015010fca5388404378093255a33..785c3d4fa0d5d17795fed29c4ca0200199e90abc 100644 (file)
@@ -84,7 +84,6 @@ dissect_teimanagement(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     }
 
     message = tvb_get_guint8(tvb, 3);
-    if (check_col(pinfo->cinfo, COL_INFO))
        col_add_str(pinfo->cinfo, COL_INFO,
            val_to_str(message, tei_msg_vals, "Unknown message type (0x%04x)"));
     if (tree) {
index d3ec6712aaa0d5389953f228e1dcbc4f4f353c73..a6109e5fb2312f7fbcec0f15d83271b937103701 100644 (file)
@@ -65,12 +65,8 @@ dissect_telkonet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        col_clear(pinfo->cinfo, COL_INFO);
 
        type = (telkonet_type_t)tvb_get_guint8(tvb, offset);
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-         col_add_fstr(pinfo->cinfo, COL_INFO, "Telkonet type: %s",
+       col_add_fstr(pinfo->cinfo, COL_INFO, "Telkonet type: %s",
                val_to_str(type, telkonet_type_vals, "Unknown (0x%02x)"));
-       }
-
-       telkonet_tree = NULL;
 
        ti = proto_tree_add_item(tree, proto_telkonet, tvb, 0, 8, ENC_NA);
        telkonet_tree = proto_item_add_subtree(ti, ett_telkonet);
index 0325fc7a7c61917a17202259924a5757eedbf5a3..4296be66cb5af689223563c6a5e344a12464cc9b 100644 (file)
@@ -85,8 +85,7 @@ parse_teredo_auth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 {
        guint idlen, aulen;
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_append_sep_str (pinfo->cinfo, COL_INFO, ", ",
+       col_append_sep_str (pinfo->cinfo, COL_INFO, ", ",
                                        "Authentication header");
 
        teredoh->th_indtyp = 1;
@@ -150,8 +149,7 @@ parse_teredo_orig(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
 {
        proto_item *ti = NULL;
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_append_sep_str (pinfo->cinfo, COL_INFO, ", ",
+       col_append_sep_str (pinfo->cinfo, COL_INFO, ", ",
                                        "Origin indication");
 
        if (tree) {
index 0f0e1606cd4d3f12ebc177651e64ac978a35f26c..588b4029b9068a001cbc921ccb7cbf0af0a310f2 100644 (file)
@@ -92,7 +92,7 @@ dissect_text_lines(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                }
        }
 
-       if (data_name && check_col(pinfo->cinfo, COL_INFO))
+       if (data_name)
                col_append_sep_fstr(pinfo->cinfo, COL_INFO, " ", "(%s)",
                                data_name);
 
index 56e9cd6c382f27eb106d9db8a740a3e180084771..dfc81697e7a3062e819ce86f0e91224923440eb6 100644 (file)
@@ -55,10 +55,8 @@ dissect_time(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
   col_set_str(pinfo->cinfo, COL_PROTOCOL, "TIME");
 
-  if (check_col(pinfo->cinfo, COL_INFO)) {
-    col_add_fstr(pinfo->cinfo, COL_INFO, "TIME %s",
+  col_add_fstr(pinfo->cinfo, COL_INFO, "TIME %s",
                 pinfo->srcport == pinfo->match_uint ? "Response":"Request");
-  }
 
   if (tree) {
 
index fa4348e61f26c2577a26964ad37bfd1fb7328015..e6abb1e13bd50f3fb17fe741274b9e8823830366 100644 (file)
@@ -167,8 +167,7 @@ dissect_tivoconnect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
         /* Adjust "Info" column and top of tree into more useful info */
         if (packet_machine) {
             proto_item_append_text(ti, ", %s", packet_machine);
-            if (check_col(pinfo->cinfo, COL_INFO))
-                col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",
+            col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",
                                             proto_name, packet_machine);
         }
         if (packet_identity) {
@@ -176,13 +175,11 @@ dissect_tivoconnect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
                         packet_machine ? " (%s)" : ", ID:%s",
                         packet_identity);
             if (packet_machine) {
-                if (check_col(pinfo->cinfo, COL_INFO))
-                    col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s (%s)",
+                col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s (%s)",
                                  proto_name, packet_machine, packet_identity);
             }
             else {
-                if (check_col(pinfo->cinfo, COL_INFO))
-                    col_add_fstr(pinfo->cinfo, COL_INFO, "%s ID:%s",
+                col_add_fstr(pinfo->cinfo, COL_INFO, "%s ID:%s",
                                  proto_name, packet_identity);
             }
         }
index c88a8cbb4dff4e7702c00f3e154b8b129e4daf23..fb006d8bcf8bdd1c1d8a7be53fa64ed1583550af 100644 (file)
@@ -290,24 +290,18 @@ static void dissect_tns_data(tvbuff_t *tvb, int offset, packet_info *pinfo,
        }
        offset += 2;
 
-       if ( check_col(pinfo->cinfo, COL_INFO) )
+       if ( is_sns )
        {
-               if ( is_sns )
-               {
-                       col_append_str(pinfo->cinfo, COL_INFO, ", SNS");
-               }
-               else
-               {
-                       col_append_str(pinfo->cinfo, COL_INFO, ", Data");
-               }
+               col_append_str(pinfo->cinfo, COL_INFO, ", SNS");
        }
-
-       if ( data_tree )
+       else
        {
-               call_dissector(data_handle,
-                   tvb_new_subset_remaining(tvb, offset), pinfo, data_tree);
+               col_append_str(pinfo->cinfo, COL_INFO, ", Data");
        }
 
+       call_dissector(data_handle,
+                   tvb_new_subset_remaining(tvb, offset), pinfo, data_tree);
+
        return;
 }
 
@@ -736,16 +730,13 @@ static void dissect_tns_marker(tvbuff_t *tvb, int offset, packet_info *pinfo,
                PROTO_ITEM_SET_HIDDEN(hidden_item);
        }
 
-       if ( check_col(pinfo->cinfo, COL_INFO) )
+       if ( is_attention )
        {
-               if ( is_attention )
-               {
-                       col_append_str(pinfo->cinfo, COL_INFO, ", Marker");
-               }
-               else
-               {
-                       col_append_str(pinfo->cinfo, COL_INFO, ", Attention");
-               }
+               col_append_str(pinfo->cinfo, COL_INFO, ", Marker");
+       }
+       else
+       {
+               col_append_str(pinfo->cinfo, COL_INFO, ", Attention");
        }
 
        if ( marker_tree )
@@ -884,11 +875,8 @@ dissect_tns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
        col_set_str(pinfo->cinfo, COL_PROTOCOL, "TNS");
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-       {
-               col_set_str(pinfo->cinfo, COL_INFO,
+       col_set_str(pinfo->cinfo, COL_INFO,
                        (pinfo->match_uint == pinfo->destport) ? "Request" : "Response");
-       }
 
        if (tree)
        {
@@ -931,11 +919,8 @@ dissect_tns_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        }
        offset += 1;
 
-       if ( check_col(pinfo->cinfo, COL_INFO))
-       {
-               col_append_fstr(pinfo->cinfo, COL_INFO, ", %s (%u)",
+       col_append_fstr(pinfo->cinfo, COL_INFO, ", %s (%u)",
                        val_to_str_const(type, tns_type_vals, "Unknown"), type);
-       }
 
        if ( tree )
        {
index 5ec37e0e578e4c635fbbf3c2c5aba777c6d17999..b6d0b1e55c4875363a059b824c7f5291b40f829b 100644 (file)
@@ -266,18 +266,16 @@ static void dissect_tpncp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
 
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "TPNCP");
 
-    if (check_col(pinfo->cinfo, COL_INFO)) {
-        if (pinfo->srcport == UDP_PORT_TPNCP_TRUNKPACK) {
-            col_add_fstr(pinfo->cinfo, COL_INFO,
-                         "EvID=%s(%d), SeqNo=%d, ChID=%d, Len=%d, Ver=%d",
-                         val_to_str_const(id, tpncp_events_id_vals, "Unknown"),
-                         id, seq_number, cid, len, ver);
-        } else {
-            col_add_fstr(pinfo->cinfo, COL_INFO,
-                         "CmdID=%s(%d), SeqNo=%d, Len=%d, Ver=%d",
-                         val_to_str_const(id, tpncp_commands_id_vals, "Unknown"),
-                         id, seq_number, len, ver);
-        }
+    if (pinfo->srcport == UDP_PORT_TPNCP_TRUNKPACK) {
+        col_add_fstr(pinfo->cinfo, COL_INFO,
+                        "EvID=%s(%d), SeqNo=%d, ChID=%d, Len=%d, Ver=%d",
+                        val_to_str_const(id, tpncp_events_id_vals, "Unknown"),
+                        id, seq_number, cid, len, ver);
+    } else {
+        col_add_fstr(pinfo->cinfo, COL_INFO,
+                        "CmdID=%s(%d), SeqNo=%d, Len=%d, Ver=%d",
+                        val_to_str_const(id, tpncp_commands_id_vals, "Unknown"),
+                        id, seq_number, len, ver);
     }
 
     if (tree) {
index 6d8488b508fbf0b5dda16c4893345dc8afbd4b29..155f4007d39ebc015b4b34f3c4d10cb1864c21fb 100644 (file)
@@ -496,8 +496,7 @@ dissect_trmac(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        mv_val = tvb_get_guint8(tvb, 3);
 
        /* Interpret the major vector */
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_add_str(pinfo->cinfo, COL_INFO,
+       col_add_str(pinfo->cinfo, COL_INFO,
                    val_to_str(mv_val, major_vector_vs, "Unknown Major Vector: %u"));
 
        if (tree) {
index 939af78bd78f6e9d13b70d7d0812be08f72fd18e..66d7df86e0976ce7af9988d1ac7a2b034f33e26d 100644 (file)
@@ -118,8 +118,7 @@ dissect_tsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        col_clear(pinfo->cinfo, COL_INFO);
 
        tsp_type = tvb_get_guint8(tvb, 0);
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_add_str(pinfo->cinfo, COL_INFO,
+       col_add_str(pinfo->cinfo, COL_INFO,
                    val_to_str(tsp_type, names_tsp_type, "Unknown message type (%u)"));
 
        if (tree) {
index 54a5442d0191ade0c5b5d76e575d5e2e7875338b..4cef24a7e835bd14940ca3794ffc94fc8bd0b202 100644 (file)
@@ -180,8 +180,7 @@ static void dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
                 network_tree = proto_item_add_subtree(name_item, ett_network);
 
                 str_name=tvb_get_ephemeral_stringz(tvb, 0x14, &str_len);
-                if (check_col (pinfo->cinfo, COL_INFO) && str_len > 0)
-                    col_append_fstr(pinfo->cinfo, COL_INFO, ", Network=\"%s\"",format_text(str_name, str_len-1));
+                col_append_fstr(pinfo->cinfo, COL_INFO, ", Network=\"%s\"",format_text(str_name, str_len-1));
 
                 while(tvb_get_guint8(tvb, 0x34 + 8*i)==0x00 && (tvb_length_remaining(tvb,0x34 + 8*i) > 6) && (i<32)) {
                     proto_tree_add_item(network_tree, hf_turbocell_station[i], tvb, 0x34+8*i, 6, ENC_NA);
index e15a2895fc5394a06e021c1fe55ace889e8af610..187151b6c2f11bfe67c3e2b403bb03e5005b1d12 100644 (file)
@@ -86,8 +86,7 @@ dissect_turnchannel_message(tvbuff_t *tvb, packet_info *pinfo,
        /* Seems to be a decent TURN channel message */
        col_set_str(pinfo->cinfo, COL_PROTOCOL, "TURN CHANNEL");
 
-       if (check_col(pinfo->cinfo, COL_INFO))
-         col_add_fstr(pinfo->cinfo, COL_INFO, "Channel Id 0x%x", channel_id);
+       col_add_fstr(pinfo->cinfo, COL_INFO, "Channel Id 0x%x", channel_id);
 
        ti = proto_tree_add_item(tree, proto_turnchannel, tvb, 0, -1, ENC_NA);
 
index 6ba302886905cd3a96f1de35f52cb90473c7d917..04481e39f513d5d47b8692fe10c7b36b1939fb27 100644 (file)
@@ -115,10 +115,7 @@ dissect_tuxedo(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                {
                        opcode = tvb_get_ntohl(tvb, 4);
 
-                       if (check_col(pinfo->cinfo, COL_INFO))
-                       {
-                               col_add_str(pinfo->cinfo, COL_INFO, val_to_str(opcode, tuxedo_opcode_vals, "Unknown (0x%02x)"));
-                       }
+                       col_add_str(pinfo->cinfo, COL_INFO, val_to_str(opcode, tuxedo_opcode_vals, "Unknown (0x%02x)"));
 
                        if (tree)
                        {
index 9cf8124602ecc77b56cfe3a825c062861d763545..050721822d64a88805c1e6f833a79a012d5f9f41 100644 (file)
@@ -375,8 +375,7 @@ dissect_tzsp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                                next_tvb, pinfo, tree))) {
 
                        col_set_str(pinfo->cinfo, COL_PROTOCOL, "UNKNOWN");
-                       if (check_col(pinfo->cinfo, COL_INFO))
-                               col_add_fstr(pinfo->cinfo, COL_INFO, "TZSP_ENCAP = %u",
+                       col_add_fstr(pinfo->cinfo, COL_INFO, "TZSP_ENCAP = %u",
                                    encapsulation);
                        call_dissector(data_handle, next_tvb, pinfo, tree);
                }
index 191e8e2746818e08324a8263ef082d096d73dbb5..fa71a76d6c8f31fdadda1add9bac747cf0515b24 100644 (file)
@@ -153,8 +153,7 @@ static void uadecode(e_ua_direction  direction,
     default:
         {
             /* add text to the frame "INFO" column */
-            if (check_col(pinfo->cinfo, COL_INFO))
-                col_append_fstr(pinfo->cinfo, COL_INFO, " - UA3G Message ERR: Opcode Unknown");
+            col_append_fstr(pinfo->cinfo, COL_INFO, " - UA3G Message ERR: Opcode Unknown");
 
             proto_tree_add_text(tree,
                 tvb,
index 9459c6686901ab6ce8718f4ea35d09e16ca366cf..dab38d0551412f642986f3167224b4590d3c4d58 100644 (file)
@@ -581,8 +581,7 @@ decode_ip_device_routing(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo
     command = tvb_get_guint8(tvb, offset);
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
             val_to_str_ext_const(command, &str_command_ext, "Unknown"));
 
     if (!ua3g_body_item)
@@ -1793,8 +1792,7 @@ decode_led_command(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
     command = tvb_get_guint8(tvb, offset);
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
             val_to_str_ext_const(command, &str_command_ext, "Unknown"));
 
     if (!ua3g_body_item)
@@ -1867,8 +1865,7 @@ decode_lcd_line_cmd(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
     column_n    = tvb_get_guint8(tvb, offset + 1);
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s %d",
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s %d",
             val_to_str_const(command, str_command, "Unknown"),
             column_n);
 
@@ -1963,8 +1960,7 @@ decode_main_voice_mode(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
     mode  = tvb_get_guint8(tvb, offset);
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
             val_to_str_ext_const(mode, &str_voice_mode_ext, "Unknown"));
 
     if (!ua3g_body_item)
@@ -2159,8 +2155,7 @@ decode_set_clck(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
     command  = tvb_get_guint8(tvb, offset);
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
             val_to_str_const(command, str_command, "Unknown"));
 
     if (!ua3g_body_item)
@@ -2312,8 +2307,7 @@ decode_external_ringing(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
     command = tvb_get_guint8(tvb, offset);
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
             val_to_str_const(command, str_ext_ring_cmd, "Unknown"));
 
     if (!ua3g_body_item)
@@ -2346,9 +2340,8 @@ decode_lcd_cursor(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
     str_on_off_val = tvb_get_guint8(tvb, offset + 1) & 0x02;
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
-                        STR_ON_OFF(str_on_off_val));
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+                    STR_ON_OFF(str_on_off_val));
 
     if (!ua3g_body_item)
         return;
@@ -2500,9 +2493,8 @@ decode_beep(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
         command = tvb_get_guint8(tvb, offset);
 
         /* add text to the frame "INFO" column */
-        if (check_col(pinfo->cinfo, COL_INFO))
-            col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
-                val_to_str_const(command, str_command, "Unknown"));
+        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+            val_to_str_const(command, str_command, "Unknown"));
 
         if (!ua3g_body_item)
             return;
@@ -2652,8 +2644,7 @@ decode_beep(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
         }
     } else { /* Classical Beep */
         /* add text to the frame "INFO" column */
-        if (check_col(pinfo->cinfo, COL_INFO))
-            col_append_fstr(pinfo->cinfo, COL_INFO, ": Classical Beep");
+        col_append_fstr(pinfo->cinfo, COL_INFO, ": Classical Beep");
 
         if (!ua3g_body_item)
             return;
@@ -2680,9 +2671,8 @@ decode_sidetone(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
     command = tvb_get_guint8(tvb, offset);
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
-            STR_ON_OFF(command));
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+        STR_ON_OFF(command));
 
     if (!ua3g_body_item)
         return;
@@ -2759,9 +2749,8 @@ decode_mute(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
     command = tvb_get_guint8(tvb, offset);
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
-            val_to_str_const(command, str_mute, "Unknown"));
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+        val_to_str_const(command, str_mute, "Unknown"));
 
     if (!ua3g_body_item)
         return;
@@ -2793,9 +2782,8 @@ decode_feedback(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
     command = tvb_get_guint8(tvb, offset);
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
-            STR_ON_OFF(command));
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+        STR_ON_OFF(command));
 
     if (!ua3g_body_item)
         return;
@@ -2928,9 +2916,8 @@ decode_audio_config(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
     command = tvb_get_guint8(tvb, offset);
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
-            val_to_str_ext_const(command, &str_command_ext, "Unknown"));
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+        val_to_str_ext_const(command, &str_command_ext, "Unknown"));
 
     if (!ua3g_body_item)
         return;
@@ -3159,9 +3146,8 @@ decode_on_off_level(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
     command = tvb_get_guint8(tvb, offset);
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
-            STR_ON_OFF(command));
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+        STR_ON_OFF(command));
 
     if (!ua3g_body_item)
         return;
@@ -3215,9 +3201,8 @@ decode_ring(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
     command = tvb_get_guint8(tvb, offset);
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
-            STR_ON_OFF(command));
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+        STR_ON_OFF(command));
 
     if (!ua3g_body_item)
         return;
@@ -3288,9 +3273,8 @@ decode_ua_dwl_protocol(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
     command = tvb_get_guint8(tvb, offset);
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
-            val_to_str_ext_const(command, &str_command_ext, "Unknown"));
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+        val_to_str_ext_const(command, &str_command_ext, "Unknown"));
 
     if (!ua3g_body_item)
         return;
@@ -3602,9 +3586,8 @@ decode_cs_ip_device_routing(proto_tree *tree _U_, tvbuff_t *tvb,
     command = tvb_get_guint8(tvb, offset);
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
-            val_to_str_const(command, str_command, "Unknown"));
+    col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+        val_to_str_const(command, str_command, "Unknown"));
 
     if (!ua3g_body_item)
         return;
@@ -4295,9 +4278,8 @@ decode_unsolicited_msg(proto_tree *tree _U_, tvbuff_t *tvb, packet_info *pinfo,
 
     if (opcode != 0x21) {
         /* add text to the frame "INFO" column */
-        if (check_col(pinfo->cinfo, COL_INFO))
-            col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
-                val_to_str_ext_const(command, &str_command_ext, "Unknown"));
+        col_append_fstr(pinfo->cinfo, COL_INFO, ": %s",
+            val_to_str_ext_const(command, &str_command_ext, "Unknown"));
 
         if (!ua3g_body_item)
             return;
@@ -4796,9 +4778,8 @@ dissect_ua3g(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     length--;
 
     /* add text to the frame "INFO" column */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
-            val_to_str_ext_const(opcode, opcodes_vals_ext_p, "Unknown"));
+    col_append_fstr(pinfo->cinfo, COL_INFO, " %s",
+        val_to_str_ext_const(opcode, opcodes_vals_ext_p, "Unknown"));
 
     proto_item_append_text(ua3g_item, ", %s", val_to_str_ext_const(opcode, opcodes_vals_ext_p, "Unknown"));
 
index 3d25dc5412289b44632b3a327a65496aaab0d36b..7f084842dc9298b34f09041238d7f790985840ed 100644 (file)
@@ -129,10 +129,7 @@ static void _dissect_uasip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     ua_tap_info.expseq = 0;
     ua_tap_info.sntseq = 0;
 
-    if (check_col(pinfo->cinfo, COL_INFO))
-    {
-        col_add_fstr(pinfo->cinfo, COL_INFO, "%s", val_to_str_ext(opcode, &uaudp_opcode_str_ext, "unknown (0x%02x)"));
-    }
+    col_add_fstr(pinfo->cinfo, COL_INFO, "%s", val_to_str_ext(opcode, &uaudp_opcode_str_ext, "unknown (0x%02x)"));
 
     uasip_item = proto_tree_add_protocol_format(tree, proto_uasip, tvb, 0, 5,
                                                 "SIP/NOE Protocol, %s",
@@ -252,19 +249,13 @@ static void _dissect_uasip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
             {
                 if (datalen > 0)
                 {
-                    if (check_col(pinfo->cinfo, COL_INFO))
-                    {
-                        col_add_fstr(pinfo->cinfo, COL_INFO, "DATA exp:%d", ua_tap_info.expseq);
-                        col_append_fstr(pinfo->cinfo, COL_INFO, " snt:%d", ua_tap_info.sntseq);
-                    }
+                    col_add_fstr(pinfo->cinfo, COL_INFO, "DATA exp:%d", ua_tap_info.expseq);
+                    col_append_fstr(pinfo->cinfo, COL_INFO, " snt:%d", ua_tap_info.sntseq);
                 }
                 else
                 {
-                    if (check_col(pinfo->cinfo, COL_INFO))
-                    {
-                        col_add_fstr(pinfo->cinfo, COL_INFO, "ACK  exp:%d", ua_tap_info.expseq);
-                        col_append_fstr(pinfo->cinfo, COL_INFO, " snt:%d", ua_tap_info.sntseq);
-                    }
+                    col_add_fstr(pinfo->cinfo, COL_INFO, "ACK  exp:%d", ua_tap_info.expseq);
+                    col_append_fstr(pinfo->cinfo, COL_INFO, " snt:%d", ua_tap_info.sntseq);
                 }
             }
         }
index ebe8eee81f46f119c5868b951996fdba647eb7df..2a275616012152d72a2dbef333ec27997e57a5d9 100644 (file)
@@ -196,11 +196,10 @@ static void _dissect_uaudp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
     ua_tap_info.sntseq = 0;
 
     /* print in "INFO" column the type of UAUDP message */
-    if (check_col(pinfo->cinfo, COL_INFO))
-        col_add_fstr(pinfo->cinfo,
-                 COL_INFO,
-                 "%s",
-                 val_to_str_ext(opcode, &uaudp_opcode_str_ext, "unknown (0x%02x)"));
+    col_add_fstr(pinfo->cinfo,
+                COL_INFO,
+                "%s",
+                val_to_str_ext(opcode, &uaudp_opcode_str_ext, "unknown (0x%02x)"));
 
     uaudp_item = proto_tree_add_protocol_format(tree, proto_uaudp, tvb, 0, 5,
                             "Universal Alcatel/UDP Encapsulation Protocol, %s",
@@ -307,8 +306,7 @@ static void _dissect_uaudp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                            tree);
             else {
                 /* XXX: expert ?? */
-                if (check_col(pinfo->cinfo, COL_INFO))
-                    col_add_str(pinfo->cinfo,
+                col_add_str(pinfo->cinfo,
                             COL_INFO,
                             "Data - Couldn't resolve direction. Check UAUDP Preferences.");
             }
index c7ac61cd37ef606b5e6b8b5f5a97fe68e63482bc..c36abc42088a129ddcc5f5949d48d992f50883ea 100644 (file)
@@ -1828,13 +1828,11 @@ dissect_ucp_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
     tap_rec->operation = OT;
 
      /* Make entries in  Info column on summary display */
-    if (check_col(pinfo->cinfo, COL_INFO)) {
-        col_append_fstr(pinfo->cinfo, COL_INFO, "%s (%s)",
-                     val_to_str_const(OT,  vals_hdr_OT,  "unknown operation"),
-                     val_to_str(O_R, vals_hdr_O_R, "Unknown (%d)"));
-        if (result == UCP_INV_CHK)
-            col_append_str(pinfo->cinfo, COL_INFO, " [checksum invalid]");
-    }
+    col_append_fstr(pinfo->cinfo, COL_INFO, "%s (%s)",
+                    val_to_str_const(OT,  vals_hdr_OT,  "unknown operation"),
+                    val_to_str(O_R, vals_hdr_O_R, "Unknown (%d)"));
+    if (result == UCP_INV_CHK)
+        col_append_str(pinfo->cinfo, COL_INFO, " [checksum invalid]");
 
     /* In the interest of speed, if "tree" is NULL, don't do any work not
        necessary to generate protocol tree items. */
index e609e2fec6f4c3e108b106512925819a3356af2e..25658fd9971cb951b92eb0e6e4aa8f21d203875a 100644 (file)
@@ -154,8 +154,7 @@ dissect_udld(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
            case TYPE_DEVICE_ID:
                /* Device ID */
 
-               if (check_col(pinfo->cinfo, COL_INFO))
-                   col_append_fstr(pinfo->cinfo, COL_INFO,
+           col_append_fstr(pinfo->cinfo, COL_INFO,
                                    "Device ID: %s  ",
                                    tvb_format_stringzpad(tvb, offset + 4,
                                                          length - 4));
@@ -188,8 +187,7 @@ dissect_udld(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                    real_length = length + 3;
                }
 
-               if (check_col(pinfo->cinfo, COL_INFO))
-                   col_append_fstr(pinfo->cinfo, COL_INFO,
+           col_append_fstr(pinfo->cinfo, COL_INFO,
                                    "Port ID: %s  ",
                                    tvb_format_stringzpad(tvb, offset + 4, length - 4));
 
index 2dbf8b83660bdd772e5363c82bf10bc7a7c4f393..71950be2a3153e41e01164b849c78cc65f913fbe 100644 (file)
@@ -784,11 +784,9 @@ dissect_usb_hid_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi
 
        col_set_str(pinfo->cinfo, COL_PROTOCOL, "USBHID");
 
-       if (check_col(pinfo->cinfo, COL_INFO)) {
-               col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",
-               val_to_str(usb_trans_info->setup.request, setup_request_names_vals, "Unknown type %x"),
-                       is_request ? "Request" : "Response");
-       }
+       col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",
+       val_to_str(usb_trans_info->setup.request, setup_request_names_vals, "Unknown type %x"),
+               is_request ? "Request" : "Response");
 
        if (is_request) {
                proto_tree_add_item(tree, hf_usb_hid_request, tvb, offset, 1, ENC_LITTLE_ENDIAN);
index 924dea29a8389ef6772dd914cb43769e8a5017c9..72ba258da0da2e9ee6bd2ff80070f3b67ec6614a 100644 (file)
@@ -161,11 +161,9 @@ dissect_usb_ms_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
 
     col_set_str(pinfo->cinfo, COL_PROTOCOL, "USBMS");
 
-    if (check_col(pinfo->cinfo, COL_INFO)) {
-        col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",
-            val_to_str(usb_trans_info->setup.request, setup_request_names_vals, "Unknown type %x"),
-            is_request?"Request":"Response");
-    }
+    col_add_fstr(pinfo->cinfo, COL_INFO, "%s %s",
+        val_to_str(usb_trans_info->setup.request, setup_request_names_vals, "Unknown type %x"),
+        is_request?"Request":"Response");
 
     if(is_request){
         proto_tree_add_item(tree, hf_usb_ms_request, tvb, offset, 1, ENC_LITTLE_ENDIAN);
index f2d8c88d98dd6b185207b1abfeec936f08bbd089..28bfec0bd478081015c3d1e757eea321f930bb7b 100644 (file)
@@ -93,11 +93,9 @@ static void
 set_addr(packet_info *pinfo _U_ , int field, gchar rid, gchar sid, gchar did)
 {
        if (field == SRC) {
-               if (check_col(pinfo->cinfo, COL_DEF_SRC))
-                       col_append_fstr(pinfo->cinfo, COL_DEF_SRC, " %2.2X:%2.2X:%2.2X", rid, sid, did);
+               col_append_fstr(pinfo->cinfo, COL_DEF_SRC, " %2.2X:%2.2X:%2.2X", rid, sid, did);
        } else {
-               if (check_col(pinfo->cinfo, COL_DEF_DST))
-                       col_append_fstr(pinfo->cinfo, COL_DEF_DST, " %2.2X:%2.2X:%2.2X", rid, sid, did);
+               col_append_fstr(pinfo->cinfo, COL_DEF_DST, " %2.2X:%2.2X:%2.2X", rid, sid, did);
        }
 }
 
index de57c9ba67dab1f5dc7103359915d6c7300a7a20..1fe7609ef0761bab8f85ee40d81f6c08baef9496 100644 (file)
@@ -120,8 +120,7 @@ dissect_v120(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
        byte0 = tvb_get_guint8(tvb, 0);
 
-       if(check_col(pinfo->cinfo, COL_RES_DL_SRC))
-               col_add_fstr(pinfo->cinfo, COL_RES_DL_SRC, "0x%02X", byte0);
+       col_add_fstr(pinfo->cinfo, COL_RES_DL_SRC, "0x%02X", byte0);
 
        byte1 = tvb_get_guint8(tvb, 1);
 
index 7b283b86d349f80635f74a5c70eb7e40c4d524d2..2382aab7f189808ce7cf508d46d510c4443ae919 100644 (file)
@@ -273,10 +273,8 @@ dissect_vjuc(tvbuff_t *tvb, packet_info *pinfo, proto_tree * tree)
 
   /* Check IP header length */
   if(ihl < IP_HDR_LEN) {
-    if(check_col(pinfo->cinfo, COL_INFO)) {
-      col_add_fstr(pinfo->cinfo, COL_INFO, "VJ uncompressed TCP (IP header length (%u) < %u)",
+    col_add_fstr(pinfo->cinfo, COL_INFO, "VJ uncompressed TCP (IP header length (%u) < %u)",
                    ihl, IP_HDR_LEN);
-    }
     if(cs != NULL)
       cs->flags |= SLF_TOSS;
     return;
@@ -325,10 +323,8 @@ dissect_vjuc(tvbuff_t *tvb, packet_info *pinfo, proto_tree * tree)
 
       /* Check TCP header length */
       if(thl < TCP_HDR_LEN) {
-        if(check_col(pinfo->cinfo, COL_INFO)) {
-          col_add_fstr(pinfo->cinfo, COL_INFO, "VJ uncompressed TCP (TCP header length (%u) < %u)",
+        col_add_fstr(pinfo->cinfo, COL_INFO, "VJ uncompressed TCP (TCP header length (%u) < %u)",
                        thl, TCP_HDR_LEN);
-        }
         if(cs != NULL)
           cs->flags |= SLF_TOSS;
         cs = NULL;  /* disable state updates */
index 0c7edf2b4f726d6e9f34f93e7c89067716a7bd3e..076bab7528359aad3ff5dff7854ae318b97a0e73 100644 (file)
@@ -823,8 +823,7 @@ vnc_startup_messages(tvbuff_t *tvb, packet_info *pinfo, gint offset,
                        g_ascii_strtod((char *)tvb_get_ephemeral_string(tvb, 4, 7), NULL);
                per_conversation_info->server_port = pinfo->srcport;
 
-               if (check_col(pinfo->cinfo, COL_INFO))
-                       col_add_fstr(pinfo->cinfo, COL_INFO,
+               col_add_fstr(pinfo->cinfo, COL_INFO,
                                     "Server protocol version: %s",
                                     tvb_format_text(tvb, 4, 7));
 
@@ -840,8 +839,7 @@ vnc_startup_messages(tvbuff_t *tvb, packet_info *pinfo, gint offset,
                per_conversation_info->client_proto_ver =
                        g_ascii_strtod((char *)tvb_get_ephemeral_string(tvb, 4, 7), NULL);
 
-               if (check_col(pinfo->cinfo, COL_INFO))
-                       col_add_fstr(pinfo->cinfo, COL_INFO,
+               col_add_fstr(pinfo->cinfo, COL_INFO,
                                     "Client protocol version: %s",
                                     tvb_format_text(tvb, 4, 7));
 
index cb05adff6d3419a2059f843aa75831e80f43761f..30e2cd4e5988f9037da559a403c6d59f4369520e 100644 (file)
@@ -7027,8 +7027,7 @@ dissect_wbxml_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
                /* Put some information here, so that the user knows what's going on. */
 
                /* Add summary to INFO column if it is enabled */
-               if (check_col(pinfo->cinfo, COL_INFO))
-                       col_append_fstr(pinfo->cinfo, COL_INFO, " (Unknown WBXML version 0x%02x)", version);
+               col_append_fstr(pinfo->cinfo, COL_INFO, " (Unknown WBXML version 0x%02x)", version);
                ti = proto_tree_add_item (tree, proto_wbxml, tvb, 0, -1, ENC_NA);
                proto_item_append_text(ti, ", Unknown version 0x%02x", version);
                return;
@@ -7085,8 +7084,7 @@ dissect_wbxml_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
        }
 
        /* Add summary to INFO column if it is enabled */
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_append_fstr(pinfo->cinfo, COL_INFO, " (WBXML %s)", summary);
+       col_append_fstr(pinfo->cinfo, COL_INFO, " (WBXML %s)", summary);
 
        /* create display subtree for the protocol */
        ti = proto_tree_add_item (tree, proto_wbxml, tvb, 0, -1, ENC_NA);
index cfb7a634d495e1cf8ac0b0f0b152adcf2bfcd8c4..34b1fe36a1003e1156fca29ee4121c20b34a5d13 100644 (file)
@@ -650,10 +650,8 @@ dissect_wccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
   col_clear(pinfo->cinfo, COL_INFO);
 
 
-  if(check_col(pinfo->cinfo, COL_INFO)) {
-    col_add_str(pinfo->cinfo, COL_INFO, val_to_str(wccp_message_type,
+  col_add_str(pinfo->cinfo, COL_INFO, val_to_str(wccp_message_type,
                                                    wccp_type_vals, "Unknown WCCP message (%u)"));
-  }
 
   if(tree != NULL) {
     wccp_tree_item = proto_tree_add_item(tree, proto_wccp, tvb, offset,
index f20e724e949ed34482049b9009ec370824680195..405d2dd87ec4ec77df62cc5d40dfe6304e763094 100644 (file)
@@ -321,12 +321,10 @@ static void dissect_wcp( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
 
 /*XXX should test seq to be sure it the last + 1 !! */
 
-       if (check_col(pinfo->cinfo, COL_INFO)){
-               col_add_str(pinfo->cinfo, COL_INFO, val_to_str_const(cmd, cmd_string, "Unknown"));
-               if ( cmd == 0xf)
-                       col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
+       col_add_str(pinfo->cinfo, COL_INFO, val_to_str_const(cmd, cmd_string, "Unknown"));
+       if ( cmd == 0xf)
+               col_append_fstr(pinfo->cinfo, COL_INFO, ", %s",
                                val_to_str_const(ext_cmd, ext_cmd_string, "Unknown"));
-       }
 
        if (tree) {
                ti = proto_tree_add_item(tree, proto_wcp, tvb, 0, wcp_header_len, ENC_NA);
index 00c0681315b9c011566e69ad6a313433a175cbb4..d047cf8f0d796f8af9458bcacb16636db61fa47b 100644 (file)
@@ -158,8 +158,7 @@ dissect_who(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        offset += 4;
 
        /* Summary information */
-       if (check_col(pinfo->cinfo, COL_INFO))
-               col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %.02f %.02f %.02f",
+       col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %.02f %.02f %.02f",
                                server_name, loadav_5, loadav_10, loadav_15);
 
        if (tree) {
index 759b0588e8f3ffc961bf126617729b838479be44..8f5af6844bac593467596a1fdd3f3146054bf8a0 100644 (file)
@@ -707,93 +707,81 @@ dissect_wlccp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        /* Make entries in Protocol column and Info column on summary display */
        col_set_str(pinfo->cinfo, COL_PROTOCOL, "WLCCP");
 
-       if (check_col(pinfo->cinfo, COL_INFO))
+       if(tvb_get_guint8(tvb, 0) == 0xC1)  /* Get the version number */
        {
-               if(tvb_get_guint8(tvb, 0) == 0xC1)  /* Get the version number */
-               {
 
-                       sap_id = tvb_get_guint8(tvb,1) & SAP_VALUE_MASK;
-                       base_message_type=(tvb_get_guint8(tvb,6)) & MT_BASE_MSG_TYPE;
-                       message_sub_type=(tvb_get_guint8(tvb, 6) &  MT_SUBTYPE ) >> 6;
+               sap_id = tvb_get_guint8(tvb,1) & SAP_VALUE_MASK;
+               base_message_type=(tvb_get_guint8(tvb,6)) & MT_BASE_MSG_TYPE;
+               message_sub_type=(tvb_get_guint8(tvb, 6) &  MT_SUBTYPE ) >> 6;
 
 
-                       switch (sap_id)
-                       {
+               switch (sap_id)
+               {
 
-                               case WLCCP_SAP_CCM:
-                               {
+                       case WLCCP_SAP_CCM:
+                       {
 
-                                       col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s",
+                               col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s",
                                                val_to_str_const(base_message_type, wlccp_msg_type_vs_0, "Unknown"),
-                                               val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown")
-                                       );
-                                       break;
+                                               val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown"));
+                               break;
 
-                               } /* case WLCCP_SAP_CCM */
+                       } /* case WLCCP_SAP_CCM */
 
-                               case WLCCP_SAP_SEC:
-                               {
+                       case WLCCP_SAP_SEC:
+                       {
 
-                                       col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s",
+                               col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s",
                                                val_to_str_const(base_message_type, wlccp_msg_type_vs_1, "Unknown"),
-                                               val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown")
-                                       );
-                                       break;
-                               } /* case WLCCP_SAP_SEC */
+                                               val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown"));
+                               break;
+                       } /* case WLCCP_SAP_SEC */
 
-                               case WLCCP_SAP_RRM:
-                               {
-                                       col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s",
+                       case WLCCP_SAP_RRM:
+                       {
+                               col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s",
                                                val_to_str_const(base_message_type, wlccp_msg_type_vs_2, "Unknown"),
-                                               val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown")
-                                       );
-                                       break;
+                                               val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown"));
+                               break;
 
-                               } /* case WLCCP_SAP_RRM */
+                       } /* case WLCCP_SAP_RRM */
 
-                               case WLCCP_SAP_QOS:
-                               {
-                                       col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s",
+                       case WLCCP_SAP_QOS:
+                       {
+                               col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s",
                                                val_to_str_const(base_message_type, wlccp_msg_type_vs_3, "Unknown"),
-                                               val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown")
-                                       );
-                                       break;
-                               } /* case WLCCP_SAP_QOS */
+                                               val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown"));
+                               break;
+                       } /* case WLCCP_SAP_QOS */
 
-                               case WLCCP_SAP_NM:
-                               {
-                                       col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s",
+                       case WLCCP_SAP_NM:
+                       {
+                               col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s",
                                                val_to_str_const(base_message_type, wlccp_msg_type_vs_4, "Unknown"),
-                                               val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown")
-                                       );
-                                       break;
+                                               val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown"));
+                               break;
 
-                               } /* case WLCCP_SAP_NM */
+                       } /* case WLCCP_SAP_NM */
 
-                               case WLCCP_SAP_MIP:
-                               {
-                                       col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s",
+                       case WLCCP_SAP_MIP:
+                       {
+                               col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s",
                                                val_to_str_const(base_message_type, wlccp_msg_type_vs_5, "Unknown"),
-                                               val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown")
-                                       );
-                                       break;
-                               } /* case WLCCP_SAP_MIP */
-
-                               default:
-                               {
-                                       col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s",
-                                               "Unknown",
-                                               val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown")
-                                       );
-                                       break;
-                               } /* default for switch sap */
+                                               val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown"));
+                               break;
+                       } /* case WLCCP_SAP_MIP */
 
+                       default:
+                       {
+                               col_add_fstr(pinfo->cinfo, COL_INFO, "Message Type: %-27s  SubType: %s", "Unknown",
+                                               val_to_str_const(message_sub_type, wlccp_subtype_vs, "Unknown"));
+                               break;
+                       } /* default for switch sap */
 
-                       } /* switch sap */
 
-               } /* if version=0xC1 (tvb_get_guint8(tvb, 0) == 0xC1)*/
+               } /* switch sap */
 
-       } /* if check_col */
+       } /* if version=0xC1 (tvb_get_guint8(tvb, 0) == 0xC1)*/
 
        if (tree) {
                /* create display subtree for the protocol */
index 5da5c637429108da0587c3203a1c051a20d7e43f..6b71ec0b0f14f459fec809038d0bf6d714293966 100644 (file)
@@ -205,11 +205,9 @@ dissect_wow_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
 
        cmd = tvb_get_guint8(tvb, offset);
 
-       if(check_col(pinfo->cinfo, COL_INFO)) {
-               col_set_str(pinfo->cinfo, COL_INFO,
+       col_set_str(pinfo->cinfo, COL_INFO,
                            val_to_str_const(cmd, cmd_vs,
                                       "Unrecognized packet type"));
-       }
 
        if(tree) {
                ti = proto_tree_add_item(tree, proto_wow, tvb, 0, -1, ENC_NA);
index 83ea4526f48127b5ee30005c27001a685df3e479..2db161812ea44745b6643ff3dc8d1318322a99cc 100644 (file)
@@ -1153,7 +1153,7 @@ dissect_wps_tlvs(proto_tree *eap_tree, tvbuff_t *tvb, int offset,
     case WPS_TLV_TYPE_MESSAGE_TYPE:
       tmp_item = proto_tree_add_item(tlv_root, hf_eapwps_tlv_message_type, tvb, offset+4, 1, ENC_BIG_ENDIAN);
       hfindex = hf_eapwps_tlv_message_type;
-      if ((pinfo != NULL) && check_col(pinfo->cinfo, COL_INFO))
+      if ((pinfo != NULL))
         col_append_fstr(pinfo->cinfo, COL_INFO, ", %s", val_to_str(tvb_get_guint8(tvb, offset+4),
                                                                    eapwps_tlv_message_type_vals,
                                                                    "Unknown (0x%02x)"));
@@ -1674,7 +1674,7 @@ dissect_exteap_wps(proto_tree *eap_tree, tvbuff_t *tvb, int offset,
   pi = proto_item_get_parent(pi);
   if (pi != NULL)
     proto_item_append_text(pi, " (Wifi Alliance, WifiProtectedSetup)");
-  if ((pinfo != NULL) && (check_col(pinfo->cinfo, COL_INFO)))
+  if (pinfo != NULL)
     col_append_fstr(pinfo->cinfo, COL_INFO, ", WPS");
 
 
index df79c656e6dd8f13a87b5fc468128a045cef904c..86770526b9fe4e5a08d147db6b87b89e1593b5e2 100644 (file)
@@ -331,17 +331,14 @@ dissect_wtls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
        proto_tree *wtls_rec_tree;
        proto_tree *wtls_msg_type_tree;
 
-       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+       switch ( pinfo->match_uint )
        {
-               switch ( pinfo->match_uint )
-               {
-                       case UDP_PORT_WTLS_WSP:
-                               col_set_str(pinfo->cinfo, COL_PROTOCOL, "WTLS+WSP" );
-                               break;
-                       case UDP_PORT_WTLS_WTP_WSP:
-                               col_set_str(pinfo->cinfo, COL_PROTOCOL, "WTLS+WTP+WSP" );
-                               break;
-               }
+               case UDP_PORT_WTLS_WSP:
+                       col_set_str(pinfo->cinfo, COL_PROTOCOL, "WTLS+WSP" );
+                       break;
+               case UDP_PORT_WTLS_WTP_WSP:
+                       col_set_str(pinfo->cinfo, COL_PROTOCOL, "WTLS+WTP+WSP" );
+                       break;
        }
 
        /* Develop the string to put in the Info column */