diff options
author | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-09-26 22:07:45 +0000 |
---|---|---|
committer | wmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-09-26 22:07:45 +0000 |
commit | bbec7929c09f36fd4d812db41bf8cfbad15b05fd (patch) | |
tree | 5462bb9beb194a7eec24261edcbb2a50952443ce /epan/dissectors/packet-i2c.c | |
parent | 824ee3deb73d681f513a0d79d54d433e3eef56f4 (diff) |
Minor cleanup related to proto_register and proto_reg_handoff
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26281 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-i2c.c')
-rw-r--r-- | epan/dissectors/packet-i2c.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/epan/dissectors/packet-i2c.c b/epan/dissectors/packet-i2c.c index 02dcfa4508..420c63f9c0 100644 --- a/epan/dissectors/packet-i2c.c +++ b/epan/dissectors/packet-i2c.c @@ -293,14 +293,10 @@ proto_register_i2c(void) void proto_reg_handoff_i2c(void) { - static gboolean inited = FALSE; - if (!inited) { - dissector_handle_t i2c_handle; - - sub_handles[SUB_DATA] = find_dissector("data"); - sub_handles[SUB_IPMB] = find_dissector("ipmi"); - i2c_handle = create_dissector_handle(dissect_i2c, proto_i2c); - dissector_add("wtap_encap", WTAP_ENCAP_I2C, i2c_handle); - inited = TRUE; - } + dissector_handle_t i2c_handle; + + sub_handles[SUB_DATA] = find_dissector("data"); + sub_handles[SUB_IPMB] = find_dissector("ipmi"); + i2c_handle = create_dissector_handle(dissect_i2c, proto_i2c); + dissector_add("wtap_encap", WTAP_ENCAP_I2C, i2c_handle); } |