diff options
author | Bill Meier <wmeier@newsguy.com> | 2009-08-09 15:07:35 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2009-08-09 15:07:35 +0000 |
commit | 0a60e46adf9869c1f095410163073395624a0612 (patch) | |
tree | 77c13d5c66dc862613b0eb1e8a6fed87876425be /plugins/wimax/msg_dreg.c | |
parent | cdb8e2c6b7397fe92de7e7e957b6231d26467378 (diff) |
'if(proto_... == -1)' not req'd; Don't register ett[] more than once;
svn path=/trunk/; revision=29351
Diffstat (limited to 'plugins/wimax/msg_dreg.c')
-rw-r--r-- | plugins/wimax/msg_dreg.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/plugins/wimax/msg_dreg.c b/plugins/wimax/msg_dreg.c index 178b2b0c57..0b7ade90b3 100644 --- a/plugins/wimax/msg_dreg.c +++ b/plugins/wimax/msg_dreg.c @@ -371,26 +371,20 @@ void proto_register_mac_mgmt_msg_dreg_req(void) } }; - if (proto_mac_mgmt_msg_dreg_req_decoder == -1) { - proto_mac_mgmt_msg_dreg_req_decoder = proto_register_protocol ( - "WiMax DREG-REQ/CMD Messages", /* name */ - "WiMax DREG-REQ/CMD (dreg)", /* short name */ - "wmx.dreg" /* abbrev */ - ); - - proto_register_field_array(proto_mac_mgmt_msg_dreg_req_decoder, hf, array_length(hf)); - proto_register_subtree_array(ett, array_length(ett)); - } + proto_mac_mgmt_msg_dreg_req_decoder = proto_register_protocol ( + "WiMax DREG-REQ/CMD Messages", /* name */ + "WiMax DREG-REQ/CMD (dreg)", /* short name */ + "wmx.dreg" /* abbrev */ + ); + + proto_register_field_array(proto_mac_mgmt_msg_dreg_req_decoder, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); } /* Register Wimax Mac Payload Protocol and Dissector */ void proto_register_mac_mgmt_msg_dreg_cmd(void) { - if (proto_mac_mgmt_msg_dreg_cmd_decoder == -1) { - proto_mac_mgmt_msg_dreg_cmd_decoder = proto_mac_mgmt_msg_dreg_req_decoder; - - proto_register_subtree_array(ett, array_length(ett)); - } + proto_mac_mgmt_msg_dreg_cmd_decoder = proto_mac_mgmt_msg_dreg_req_decoder; } /* Decode DREG-REQ messages. */ |