Don't guard col_set_str (COL_PROTOCOL) with col_check
[obnox/wireshark/wip.git] / epan / dissectors / packet-fcoe.c
index 35debeb89b04c01593fb68328040111fe90a9753..11b60ebf581beb606be35dc241d58e156e04e249 100644 (file)
@@ -6,7 +6,7 @@
  * $Id$
  *
  * Wireshark - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * By Gerald Combs <gerald@wireshark.org>
  * Copyright 1998 Gerald Combs
  *
  * Based on packet-fcip.c, Copyright 2001, Dinesh G Dutt (ddutt@cisco.com)
@@ -95,8 +95,6 @@ static const value_string fcoe_sof_vals[] = {
     {0, NULL}
 };
 
-void proto_reg_handoff_fcoe(void);
-
 static int proto_fcoe          = -1;
 static int hf_fcoe_ver         = -1;
 static int hf_fcoe_len         = -1;
@@ -166,8 +164,7 @@ dissect_fcoe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
         if (version != 0)
             ver = ep_strdup_printf(ver, "ver %d ", version);
     }
-    if (check_col(pinfo->cinfo, COL_PROTOCOL)) 
-        col_set_str(pinfo->cinfo, COL_PROTOCOL, "FCoE");
+    col_set_str(pinfo->cinfo, COL_PROTOCOL, "FCoE");
     crc_offset = header_len + frame_len;
     eof_offset = crc_offset + 4;
     bytes_remaining = tvb_length_remaining(tvb, header_len);
@@ -292,25 +289,23 @@ proto_register_fcoe(void)
     static hf_register_info hf[] = {
         { &hf_fcoe_sof,
           {"SOF", "fcoe.sof", FT_UINT8, BASE_HEX, VALS(&fcoe_sof_vals), 0,
-           "", HFILL}},
+           NULL, HFILL}},
         { &hf_fcoe_eof,
           {"EOF", "fcoe.eof", FT_UINT8, BASE_HEX, VALS(&fcoe_eof_vals), 0,
-           "", HFILL}},
+           NULL, HFILL}},
         { &hf_fcoe_ver,
-          {"Version", "fcoe.ver", FT_UINT32, BASE_DEC, NULL, 0, "", HFILL}},
+          {"Version", "fcoe.ver", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL}},
         { &hf_fcoe_len,
           {"Frame length", "fcoe.len", FT_UINT32,
-            BASE_DEC, NULL, 0, "", HFILL}},
+            BASE_DEC, NULL, 0, NULL, HFILL}},
         { &hf_fcoe_crc,
-          {"CRC", "fcoe.crc", FT_UINT32, BASE_HEX, NULL, 0, "", HFILL}},
+          {"CRC", "fcoe.crc", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL}},
         { &hf_fcoe_crc_good,
-          {"CRC good", "fcoe.crc_good", FT_BOOLEAN, BASE_NONE, NULL, 0,
-            "True: CRC matches packet content; "
-            "False: doesn't match or not checked.", HFILL }},
+          {"CRC good", "fcoe.crc_good", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+            "True: CRC matches packet content; False: doesn't match or not checked.", HFILL }},
         { &hf_fcoe_crc_bad,
-          {"CRC bad", "fcoe.crc_bad", FT_BOOLEAN, BASE_NONE, NULL, 0,
-            "True: CRC doesn't match packet content; "
-            "False: matches or not checked.", HFILL }}
+          {"CRC bad", "fcoe.crc_bad", FT_BOOLEAN, BASE_NONE, NULL, 0x0,
+            "True: CRC doesn't match packet content; False: matches or not checked.", HFILL }}
     };
     static gint *ett[] = {
         &ett_fcoe,
@@ -326,7 +321,7 @@ proto_register_fcoe(void)
     proto_register_field_array(proto_fcoe, hf, array_length(hf));
     proto_register_subtree_array(ett, array_length(ett));
 
-    fcoe_module = prefs_register_protocol(proto_fcoe, proto_reg_handoff_fcoe);
+    fcoe_module = prefs_register_protocol(proto_fcoe, NULL);
 
     prefs_register_obsolete_preference(fcoe_module, "ethertype");
 }