reg_handoff: "once-only" test [if(!initted)...] not req'd since no prefs callback.
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 14 Jan 2009 02:25:37 +0000 (02:25 +0000)
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 14 Jan 2009 02:25:37 +0000 (02:25 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@27227 f5534014-38df-0310-8fa8-9805f1628bb7

epan/dissectors/packet-homeplug.c

index 4f4666e9dc3664b2cad4ecd03343f1b0668b9491..76d90cd4695696301ecc3c54c4de0c4782c6200c 100644 (file)
@@ -38,9 +38,6 @@
 #include <epan/proto.h>
 #include <epan/ptvcursor.h>
 
-/* forward reference */
-void proto_reg_handoff_homeplug(void);
-
 static int proto_homeplug              = -1;
 
 static int hf_homeplug_mctrl           = -1;
@@ -1381,14 +1378,8 @@ dissect_homeplug(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
 void
 proto_reg_handoff_homeplug(void)
 {
-  static gboolean inited = FALSE;
-
-  if (!inited) {
-    dissector_handle_t homeplug_handle;
+  dissector_handle_t homeplug_handle;
 
-    homeplug_handle = create_dissector_handle(dissect_homeplug, proto_homeplug);
-    dissector_add("ethertype", ETHERTYPE_HOMEPLUG, homeplug_handle);
-
-    inited = TRUE;
-  }
+  homeplug_handle = create_dissector_handle(dissect_homeplug, proto_homeplug);
+  dissector_add("ethertype", ETHERTYPE_HOMEPLUG, homeplug_handle);
 }